{"record":{"id":"9e2da5607fe48118","repo":"DioxusLabs/dioxus","slug":"attribute-path-is-not-deprecated","errorCode":null,"errorMessage":"attribute path is not `deprecated`","messagePattern":"attribute path is not `deprecated`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/core-macro/src/utils.rs","lineNumber":48,"sourceCode":"    let ty_formatted = ty_unformatted.replace(' ', \"\");\n\n    ty_formatted.to_string()\n}\n\n/// Represents the `#[deprecated]` attribute.\n///\n/// You can use the [`DeprecatedAttribute::from_meta`] function to try to parse an attribute to this struct.\n#[derive(Default)]\npub struct DeprecatedAttribute {\n    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()),","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/core-macro/src/utils.rs#L30-L66","documentation":"Error \"attribute path is not `deprecated`\" thrown in DioxusLabs/dioxus.","triggerScenarios":"Thrown at packages/core-macro/src/utils.rs:48 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"}