{"record":{"id":"e1f3baa57a8b9981","repo":"influxdata/influxdb","slug":"name-must-have-exactly-one-type-parameter","errorCode":null,"errorMessage":"`{name}` must have exactly one type parameter","messagePattern":"`(.+?)` must have exactly one type parameter","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog_macros/src/types.rs","lineNumber":86,"sourceCode":"                    format!(\n                        \"`{name}` is generic. Only {} may take type parameters in a catalog \\\n                         record, and any other generic must be parameterised solely by const \\\n                         literals (e.g. `Reserved<16>`); a generic body has no single persisted \\\n                         shape.\",\n                        CONTAINERS.join(\" and \")\n                    ),\n                ));\n            }\n            let inner: Vec<&Type> = args\n                .args\n                .iter()\n                .filter_map(|arg| match arg {\n                    GenericArgument::Type(t) => Some(t),\n                    _ => None,\n                })\n                .collect();\n            if inner.len() != args.args.len() || inner.len() != 1 {\n                return Err(syn::Error::new(\n                    ty.span(),\n                    format!(\"`{name}` must have exactly one type parameter\"),\n                ));\n            }\n            check(inner[0])\n        }\n        PathArguments::AngleBracketed(_) | PathArguments::Parenthesized(_) => Err(unsupported(ty)),\n    }\n}\n\n/// Whether a generic argument is a const *literal*, the only generic argument\n/// permitted outside `Option`/`Vec`. See the call site for why.\nfn is_const_literal(arg: &GenericArgument) -> bool {\n    matches!(\n        arg,\n        GenericArgument::Const(syn::Expr::Lit(syn::ExprLit {\n            lit: syn::Lit::Int(_),\n            ..","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog_macros/src/types.rs#L68-L104","documentation":"A compile-time error from the catalog record field-type checker. Whitelisted container types (those in `CONTAINERS`) must carry exactly one type argument, and that argument must itself be a type (not a lifetime or const). Zero, multiple, or non-type arguments make the persisted shape ambiguous, so `check_path` rejects them before recursing into the single inner type.","triggerScenarios":"Declaring a field like `field: Option<>` (empty), `field: Vec<u64, Alloc>` (two arguments), or `field: Option<'a T>`-style arguments where the inner-type filter yields a count that isn't exactly 1. Raised in `check_path` when `inner.len() != 1`.","commonSituations":"A developer writes a container with a custom allocator/capacity parameter, or leaves an incomplete generic argument while editing.","solutions":["Write the container with exactly one type argument: `Option<T>` or `Vec<T>`.","If extra parameters (allocator, capacity) are needed, drop them or encode the fixed layout in a dedicated wire type in `records::types`."],"exampleFix":"// before\n#[catalog_record(shape = 0x1)]\nstruct Foo { items: Vec<u64, CustomAlloc> }\n\n// after\n#[catalog_record(shape = 0x1)]\nstruct Foo { items: Vec<u64> }","handlingStrategy":"validation","validationCode":"// Containers must have exactly one type argument:\n// OK: Vec<u64>, Option<String>\n// NOT OK: Vec<u64, Alloc>, Option<>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write Option<T> / Vec<T> with a single type argument.","Drop allocator or capacity parameters from container field types.","Encode fixed-size layouts with const-literal types (e.g. Reserved<16>) if needed."],"tags":["proc-macro","compile-time","generics","serialization"],"backgroundTag":"invalid-argument-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}