{"record":{"id":"f757e521fb6eedbc","repo":"rust-lang/rust","slug":"unrecognized-meta-expression-s","errorCode":null,"errorMessage":"unrecognized meta expression `{s}`","messagePattern":"unrecognized meta expression `(.+?)`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"library/compiler-builtins/crates/libm-macros/src/lib.rs","lineNumber":467,"sourceCode":"\n    fn finish(self) -> syn::Result<()> {\n        match self.error {\n            Some(e) => Err(e),\n            None => Ok(()),\n        }\n    }\n\n    fn visit_ident_inner(&mut self, i: &mut Ident) {\n        let s = i.to_string();\n        if !s.starts_with(\"MACRO\") || self.error.is_some() {\n            return;\n        }\n\n        match s.as_str() {\n            \"MACRO_FN_NAME\" => *i = Ident::new(self.fn_name, i.span()),\n            \"MACRO_FN_NAME_NORMALIZED\" => *i = Ident::new(&self.norm_name, i.span()),\n            _ => {\n                self.error = Some(syn::Error::new(\n                    i.span(),\n                    format!(\"unrecognized meta expression `{s}`\"),\n                ));\n            }\n        }\n    }\n}\n\nimpl VisitMut for MacroReplace {\n    fn visit_ident_mut(&mut self, i: &mut Ident) {\n        self.visit_ident_inner(i);\n        syn::visit_mut::visit_ident_mut(self, i);\n    }\n}\n\n/// Return the unsuffixed version of a function name; e.g. `abs` and `absf` both return `abs`,\n/// `lgamma_r` and `lgammaf_r` both return `lgamma_r`.\nfn base_name(name: &str) -> &str {","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/library/compiler-builtins/crates/libm-macros/src/lib.rs#L449-L485","documentation":"Inside `extra` and `fn_extra` expressions the MacroReplace visitor recognizes two magic identifiers, `MACRO_FN_NAME` and `MACRO_FN_NAME_NORMALIZED`, substituting the per-invocation function name (lib.rs:457-473). Any other identifier whose text starts with `MACRO` is treated as a misspelled magic token and rejected.","triggerScenarios":"Writing `MACRO_FN_TYPE`, `MACRO_CRET`, or any `MACRO_...` identifier other than the two supported ones inside an `extra` or `fn_extra` expression.","commonSituations":"Guessing at additional magic identifiers; typoing `MACRO_FN_NAME`; copy-paste from a different macro system.","solutions":["Use only MACRO_FN_NAME or MACRO_FN_NAME_NORMALIZED.","If the identifier is meant to be an ordinary variable, rename it so it does not begin with MACRO."],"exampleFix":"// before\nextra: [MACRO_RET_TYPE],\n// after\nextra: [MACRO_FN_NAME],","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reserve the MACRO prefix only for the two supported magic identifiers.","Search the crate for MACRO_ usages when refactoring expression helpers."],"tags":["rust","proc-macro","libm","compile-time","validation"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}