{"record":{"id":"1942d700f67c2e19","repo":"DioxusLabs/dioxus","slug":"doc-attribute-is-not-a-string-literal","errorCode":null,"errorMessage":"doc attribute is not a string literal","messagePattern":"doc attribute is not a string literal","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":1321,"sourceCode":"                .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>,\n    server_args: Punctuated<FnArg, Comma>,\n\n    // todo: support these since `server_fn` had them","sourceCodeStart":1303,"sourceCodeEnd":1339,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-macro/src/lib.rs#L1303-L1339","documentation":"In doc_iter, a #[doc] name-value attribute's expression was not a string literal (Expr::Lit with LitStr). Doc attributes must be string literals; any other expression form reaches this panic in the fullstack macro.","triggerScenarios":"Thrown at packages/fullstack-macro/src/lib.rs:1321 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The doc attribute value must be a string literal: #[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"}