{"record":{"id":"5e209cc34c550bea","repo":"DioxusLabs/dioxus","slug":"literal-in-deprecated-value-must-be-a-string","errorCode":null,"errorMessage":"literal in `deprecated` value must be a string","messagePattern":"literal in `deprecated` value must be a string","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/core-macro/src/utils.rs","lineNumber":58,"sourceCode":"    pub since: Option<String>,\n    pub note: Option<String>,\n}\n\nimpl DeprecatedAttribute {\n    /// Returns `None` if the given attribute was not a valid form of the `#[deprecated]` attribute.\n    pub fn from_meta(meta: &Meta) -> syn::Result<Self> {\n        if meta.path() != &parse_quote!(deprecated) {\n            return Err(syn::Error::new(\n                meta.span(),\n                \"attribute path is not `deprecated`\",\n            ));\n        }\n\n        match &meta {\n            Meta::Path(_) => Ok(Self::default()),\n            Meta::NameValue(name_value) => {\n                let Expr::Lit(expr_lit) = &name_value.value else {\n                    return Err(syn::Error::new(\n                        name_value.span(),\n                        \"literal in `deprecated` value must be a string\",\n                    ));\n                };\n\n                Ok(Self {\n                    since: None,\n                    note: lit_to_string(expr_lit.lit.clone()).map(|s| s.trim().to_string()),\n                })\n            }\n            Meta::List(list) => {\n                let parsed = list.parse_args::<DeprecatedAttributeArgsParser>()?;\n\n                Ok(Self {\n                    since: parsed.since.map(|s| s.trim().to_string()),\n                    note: parsed.note.map(|s| s.trim().to_string()),\n                })\n            }","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/core-macro/src/utils.rs#L40-L76","documentation":"Error \"literal in `deprecated` value must be a string\" thrown in DioxusLabs/dioxus.","triggerScenarios":"Thrown at packages/core-macro/src/utils.rs:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}