{"record":{"id":"6925de52f94bd6c5","repo":"diesel-rs/diesel","slug":"expected-disable-but-got-ident","errorCode":null,"errorMessage":"expected `disable`, but got `{ident}`","messagePattern":"expected `disable`, but got `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"diesel_attribute_parser/src/lib.rs","lineNumber":456,"sourceCode":"                        item: value,\n                        attribute_span: attr.meta.span(),\n                    });\n                }\n            }\n        }\n    }\n    Ok(out)\n}\n\nstruct DisabledCheckForBackend {\n    value: LitBool,\n}\n\nimpl syn::parse::Parse for DisabledCheckForBackend {\n    fn parse(input: ParseStream) -> Result<Self> {\n        let ident = input.parse::<Ident>()?;\n        if ident != \"disable\" {\n            return Err(syn::Error::new(\n                ident.span(),\n                format!(\"expected `disable`, but got `{ident}`\"),\n            ));\n        }\n        let lit = parse_eq::<LitBool>(input, \"\")?;\n        if !lit.value {\n            return Err(syn::Error::new(\n                lit.span(),\n                \"only `true` is accepted in this position. \\\n                 If you want to enable these checks, just skip the attribute entirely\",\n            ));\n        }\n        Ok(Self { value: lit })\n    }\n}\n\n#[derive(Debug, Clone, Copy)]\n#[allow(clippy::enum_variant_names)]","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/diesel-rs/diesel/blob/6fa6ed01b24b24248ab2a611698d0a7c6a2e9120/diesel_attribute_parser/src/lib.rs#L438-L474","documentation":"Compile-time error from parsing the #[diesel(disable_...)] style check used for per-backend attribute disabling. The Parse impl for DisabledCheckForBackend reads one identifier and requires it to be exactly `disable`; a different word after the relevant attribute keyword (e.g. `disabled` or `off`) triggers this error, which includes the offending identifier. Fix: write the flag as `disable`.","triggerScenarios":"Thrown at diesel_attribute_parser/src/lib.rs:456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write `disable` as the first token inside the attribute","Remove the attribute if backend checks should stay enabled"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6fa6ed01b24b24248ab2a611698d0a7c6a2e9120","analyzedAt":"2026-09-07T01:50:13.074Z","contentChangedAt":"2026-09-07T01:50:13.074Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}