{"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/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core-macro/src/utils.rs#L30-L66","documentation":"Guard in DeprecatedAttribute::from_meta: the caller passed a Meta whose path is not `deprecated`. This is a caller-contract violation of the helper (it only parses #[deprecated] metas) rather than user input error; component attribute collection filters for deprecated before calling.","triggerScenarios":"Thrown at packages/core-macro/src/utils.rs:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the `deprecated` attribute path exactly, e.g. #[deprecated = \"...\"]; other attribute names are not accepted in this position."],"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-23T08:17:48.524Z"}