{"record":{"id":"857ae7455390fdea","repo":"neon-bindings/neon","slug":"unknown-attribute","errorCode":null,"errorMessage":"Unknown attribute '{}'","messagePattern":"Unknown attribute '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/neon-macros/src/export/class/meta.rs","lineNumber":68,"sourceCode":"                    break;\n                }\n            }\n        }\n\n        // Check if there are additional attributes after \"class\" or \"class(...)\"\n        if input.parse::<syn::Token![,]>().is_ok() {\n            // Parse additional attributes like name = \"...\"\n            while !input.is_empty() {\n                let name_token: syn::Ident = input.parse()?;\n\n                match name_token.to_string().as_str() {\n                    \"name\" => {\n                        input.parse::<syn::Token![=]>()?;\n                        let name_value: syn::LitStr = input.parse()?;\n                        meta.export_name = Some(name_value.value());\n                    }\n                    _ => {\n                        return Err(syn::Error::new(\n                            name_token.span(),\n                            format!(\"Unknown attribute '{}'\", name_token),\n                        ));\n                    }\n                }\n\n                // Parse optional comma\n                if input.parse::<syn::Token![,]>().is_err() {\n                    break;\n                }\n            }\n        }\n\n        Ok(meta)\n    }\n}\n\n/// Parser for class export metadata","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/neon-bindings/neon/blob/38960e4381d9ad13b551cdf2d261f609167c9bc2/crates/neon-macros/src/export/class/meta.rs#L50-L86","documentation":"Compile-time error raised while parsing the top-level attributes after `export(class ...)` (not inside the parentheses). Only `name` is accepted as an additional attribute; any other key triggers this error. It protects the `class` export's metadata parsing from unsupported options.","triggerScenarios":"Writing `#[neon] export(class, rename = \"binding\")` or any identifier other than `name` following `class` at the top level of the export attribute (e.g. `export(class, export = \"x\")`).","commonSituations":"Confusing the function-export attribute surface with the class one, attempting to set a JS export name with a made-up key, or following outdated documentation/examples from older Neon versions.","solutions":["Use `name` as the attribute key: `export(class, name = \"bindingName\")`.","Remove the unsupported attribute entirely if the default export name is fine.","Verify against the current Neon documentation that the attribute you want exists for class exports."],"exampleFix":"// before\n#[neon]\nexport(class, export_name = \"MyClass\")\n// after\n#[neon]\nexport(class, name = \"MyClass\")","handlingStrategy":"validation","validationCode":"// Only `name` is valid as a top-level attribute after export(class ...):\n// verify every top-level key is exactly `name`:\n// #[neon] export(class, name = \"...\")\nconst VALID_TOP_LEVEL_ATTRS: [&str; 1] = [\"name\"];\nfn check_top_level_attr(attr: &str) -> Result<(), String> {\n    if VALID_TOP_LEVEL_ATTRS.contains(&attr) { Ok(()) } else { Err(format!(\"Unknown attribute '{}'\", attr)) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `name = \"...\"` (top level) for the module export binding and `class(name = \"...\")` for the JS class name.","Consult current Neon docs for the supported attribute grammar before adding options.","Compile early and often; these are parse-time errors caught by `cargo check`."],"tags":["rust","proc-macro","neon","attribute-parsing"],"backgroundTag":"invalid-config-value","analyzedSha":"38960e4381d9ad13b551cdf2d261f609167c9bc2","analyzedAt":"2026-09-13T09:05:33.640Z","contentChangedAt":"2026-09-13T09:05:33.640Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}