{"record":{"id":"639b3adfb1833862","repo":"rwf2/Rocket","slug":"invalid-lint-name-known-lints","errorCode":null,"errorMessage":"invalid lint `{name}` (known lints: {})","messagePattern":"invalid lint `(.+?)` \\(known lints: (.+?)\\)","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"core/codegen/src/attribute/suppress/lint.rs","lineNumber":112,"sourceCode":"        })\n    }\n\n    pub fn enabled(self, ctxt: Span) -> bool {\n        !self.is_suppressed(ctxt)\n    }\n\n    pub fn how_to_suppress(self) -> String {\n        format!(\"apply `#[suppress({})]` before the item to suppress this lint\", self.as_str())\n    }\n}\n\nimpl syn::parse::Parse for Lint {\n    fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {\n        let ident: syn::Ident = input.parse()?;\n        let name = ident.to_string();\n        Lint::from_str(&name).ok_or_else(|| {\n            let msg = format!(\"invalid lint `{name}` (known lints: {})\", Lint::lints());\n            syn::Error::new(ident.span(), msg)\n        })\n    }\n}\n","sourceCodeStart":94,"sourceCodeEnd":116,"githubUrl":"https://github.com/rwf2/Rocket/blob/3a54d079aef060a8f732bd04ea54b0581a604087/core/codegen/src/attribute/suppress/lint.rs#L94-L116","documentation":"Compile-time syn parse error from Rocket's lint-suppression attribute parser: #[suppress(name)] was given a name that does not match any declared lint. The valid names are fixed by declare_lints! in core/codegen/src/attribute/suppress/lint.rs: unknown_format, dubious_payload, segment_chars, arbitrary_main, sync_spawn (matching is case-insensitive). The error message lists all known lints.","triggerScenarios":"Writing #[suppress(segmentchars)] (missing underscore), #[suppress(unused)] (a rustc lint, not a Rocket lint), or any typo'd name inside #[suppress(...)] on an item. It fires during syn parsing of the attribute, before expansion.","commonSituations":"Confusing Rocket's #[suppress] with #[allow] for compiler lints; upgrading Rocket versions where lint names changed; suppressing a lint remembered from an older release.","solutions":["Use one of the listed names exactly: unknown_format, dubious_payload, segment_chars, arbitrary_main, sync_spawn","For compiler lints (unused, dead_code), use #[allow(...)] instead — #[suppress] is only for Rocket's own codegen lints","Check spelling separators: names use underscores, e.g. segment_chars not segmentchars"],"exampleFix":"// before\n#[suppress(segmentchars)]\n#[get(\"/a/<id>\")]\nfn a(id: &str) { }\n\n// after\n#[suppress(segment_chars)]\n#[get(\"/a/<id>\")]\nfn a(id: &str) { }","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bookmark the five Rocket lint names: unknown_format, dubious_payload, segment_chars, arbitrary_main, sync_spawn","Use #[allow(...)] for compiler lints — #[suppress] only silences Rocket codegen lints","Names are case-insensitive but use the exact underscored spelling to avoid confusion"],"tags":["rust","rocket","proc-macro","lint","compile-time","suppress-attribute"],"backgroundTag":"unknown-lint-name","analyzedSha":"3a54d079aef060a8f732bd04ea54b0581a604087","analyzedAt":"2026-08-16T22:01:48.395Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}