{"record":{"id":"8e9c237465f58842","repo":"diesel-rs/diesel","slug":"unexpected-end-of-input-expected-parentheses","errorCode":null,"errorMessage":"unexpected end of input, expected parentheses","messagePattern":"unexpected end of input, expected parentheses","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"diesel_attribute_parser/src/deprecated/changeset_options.rs","lineNumber":9,"sourceCode":"use syn::parse::{ParseStream, Result};\nuse syn::{Ident, LitBool, parenthesized};\n\nuse crate::deprecated::utils::parse_eq_and_lit_str;\nuse crate::notes::TREAT_NONE_AS_NULL_NOTE;\n\npub fn parse_changeset_options(name: Ident, input: ParseStream) -> Result<(Ident, LitBool)> {\n    if input.is_empty() {\n        return Err(syn::Error::new(\n            name.span(),\n            \"unexpected end of input, expected parentheses\",\n        ));\n    }\n\n    let content;\n    parenthesized!(content in input);\n\n    let name: Ident = content.parse()?;\n    let name_str = name.to_string();\n\n    if name_str != \"treat_none_as_null\" {\n        return Err(syn::Error::new(\n            name.span(),\n            \"expected `treat_none_as_null`\",\n        ));\n    }\n","sourceCodeStart":1,"sourceCodeEnd":27,"githubUrl":"https://github.com/diesel-rs/diesel/blob/6fa6ed01b24b24248ab2a611698d0a7c6a2e9120/diesel_attribute_parser/src/deprecated/changeset_options.rs#L1-L27","documentation":"The deprecated `treat_none_as_null` attribute parser requires parenthesized arguments; the attribute was given with empty or missing parentheses, so the parser reports `unexpected end of input, expected parentheses`.","triggerScenarios":"Writing `#[diesel(treat_none_as_null)]` without `(true)` or `(false)` on an `Insertable`/`AsChangeset` struct.","commonSituations":"Copying the attribute name from docs without the value, or removing the value while debugging NULL-handling behavior.","solutions":["Add a boolean argument: `#[diesel(treat_none_as_null(true))]` or `(false)`","Remove the attribute entirely if you want the default behavior (None maps to a skipped column, not SQL NULL)"],"exampleFix":"// before\n#[diesel(treat_none_as_null)]\npub struct NewPost { title: Option<String> }\n// after\n#[diesel(treat_none_as_null(true))]\npub struct NewPost { title: Option<String> }","handlingStrategy":"validation","validationCode":"// compile-time check: attribute must be #[diesel(treat_none_as_null(true|false))]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always provide the boolean argument explicitly","Document NULL-handling intent in code review checklists"],"tags":["rust","proc-macro","diesel-derive","attribute-syntax"],"backgroundTag":"invalid-argument-format","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"}