{"record":{"id":"c0f137805bf3ec19","repo":"databendlabs/databend","slug":"unsupported-type","errorCode":null,"errorMessage":"unsupported type","messagePattern":"unsupported type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/query/ast/visit_derive/src/lib.rs","lineNumber":197,"sourceCode":"    })\n}\n\nfn emit_field_stmt(\n    field: &Field,\n    access: TokenStream2,\n    mutable: bool,\n) -> syn::Result<TokenStream2> {\n    emit_walk_for_type(&field.ty, access, mutable)\n}\n\nfn emit_walk_for_type(ty: &Type, access: TokenStream2, mutable: bool) -> syn::Result<TokenStream2> {\n    match ty {\n        Type::Path(type_path) => {\n            let segment = type_path\n                .path\n                .segments\n                .last()\n                .ok_or_else(|| Error::new(type_path.span(), \"unsupported type\"))?;\n            let name = segment.ident.to_string();\n\n            if is_primitive_noop_leaf(&name) {\n                return Ok(TokenStream2::new());\n            }\n\n            let trait_name = if mutable {\n                quote!(crate::visit::WalkMut)\n            } else {\n                quote!(crate::visit::Walk)\n            };\n            let method = if mutable {\n                quote!(walk_mut)\n            } else {\n                quote!(walk)\n            };\n            Ok(quote! {\n                match #trait_name::#method(#access, visitor)? {","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/query/ast/visit_derive/src/lib.rs#L179-L215","documentation":"A generic compile-time guard in emit_walk_for_type of the visit_derive macro: the field or variant type is not a Type::Path (e.g. it is a reference, slice, tuple, function pointer, or other exotic type), so the macro cannot resolve it to a Walk/WalkMut impl. It fires when derive(Walk)/derive(WalkMut) is applied to a type containing such a field, aborting the derive expansion.","triggerScenarios":"Thrown at src/query/ast/visit_derive/src/lib.rs:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported type path in the derived field: primitives, Box, Option, Vec, or types implementing Walk/WalkMut.","If the field is a custom non-Walk type, wrap it in a newtype and implement Walk manually, or skip the field via #[visit(skip)] if the derive supports it.","For type paths with no last segment (e.g. exotic syn::Type paths), restructure the field declaration to a plain named type."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}