{"record":{"id":"4258834da3c16c33","repo":"DioxusLabs/dioxus","slug":"doc-attribute-is-not-a-name-value-attribute","errorCode":null,"errorMessage":"doc attribute is not a name-value attribute","messagePattern":"doc attribute is not a name-value attribute","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":1318,"sourceCode":"        if self.summary.is_none() {\n            self.summary = doc_iter(&function.attrs)\n                .next()\n                .map(|item| (parse_quote!(summary), item.clone()))\n        }\n        if self.id.is_none() {\n            let id = &function.sig.ident;\n            self.id = Some((parse_quote!(id), LitStr::new(&id.to_string(), id.span())));\n        }\n    }\n}\n\nfn doc_iter(attrs: &[Attribute]) -> impl Iterator<Item = &LitStr> + '_ {\n    attrs\n        .iter()\n        .filter(|attr| attr.path().is_ident(\"doc\"))\n        .map(|attr| {\n            let Meta::NameValue(meta) = &attr.meta else {\n                panic!(\"doc attribute is not a name-value attribute\");\n            };\n            let Expr::Lit(lit) = &meta.value else {\n                panic!(\"doc attribute is not a string literal\");\n            };\n            let Lit::Str(lit_str) = &lit.lit else {\n                panic!(\"doc attribute is not a string literal\");\n            };\n            lit_str\n        })\n}\n\nstruct Route {\n    method: Option<Method>,\n    path_params: Vec<(Slash, PathParam)>,\n    query_params: Vec<QueryParam>,\n    route_lit: Option<LitStr>,\n    prefix: Option<LitStr>,\n    oapi_options: Option<OapiOptions>,","sourceCodeStart":1300,"sourceCodeEnd":1336,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-macro/src/lib.rs#L1300-L1336","documentation":"While iterating a function's doc attributes in the fullstack macro, an attribute named doc was not in Meta::NameValue form. Doc comments are always name-value string literals when produced by rustc, so a hand-written #[doc = ...] of another shape triggers this guard in doc_iter.","triggerScenarios":"Thrown at packages/fullstack-macro/src/lib.rs:1318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write the doc attribute in name-value form: #[doc = 'text']."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}