{"record":{"id":"8678b49bf07d6273","repo":"rust-lang/rust","slug":"unrecognized-function-name-mentioned","errorCode":null,"errorMessage":"unrecognized function name `{mentioned}`","messagePattern":"unrecognized function name `(.+?)`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"library/compiler-builtins/crates/libm-macros/src/lib.rs","lineNumber":198,"sourceCode":"        .flat_map(|map_list| map_list.iter())\n        .flat_map(|attr_map| attr_map.names.iter());\n    let only_mentions = input.only.iter().flat_map(|only_list| only_list.iter());\n    let fn_extra_mentions = input\n        .fn_extra\n        .iter()\n        .flat_map(|v| v.keys())\n        .filter(|name| *name != \"_\");\n    let all_mentioned_fns = input\n        .skip\n        .iter()\n        .chain(only_mentions)\n        .chain(attr_mentions)\n        .chain(fn_extra_mentions);\n\n    // Make sure that every function mentioned is a real function\n    for mentioned in all_mentioned_fns {\n        if !ALL_OPERATIONS.iter().any(|func| mentioned == func.name) {\n            let e = syn::Error::new(\n                mentioned.span(),\n                format!(\"unrecognized function name `{mentioned}`\"),\n            );\n            return Err(e);\n        }\n    }\n\n    if !input.skip.is_empty() && input.only.is_some() {\n        let e = syn::Error::new(\n            input.only_span.unwrap(),\n            \"only one of `skip` or `only` may be specified\",\n        );\n        return Err(e);\n    }\n\n    // Construct a list of what we intend to expand\n    let mut fn_list = Vec::new();\n    for func in ALL_OPERATIONS.iter() {","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/library/compiler-builtins/crates/libm-macros/src/lib.rs#L180-L216","documentation":"Thrown by the `for_each_function!` macro's `validate` (lib.rs:198) when a function name mentioned in `skip`, `only`, `attributes`, or `fn_extra` does not match any entry in the global `ALL_OPERATIONS` list. Every referenced name must be a real libm operation.","triggerScenarios":"Typing a non-existent function in `skip: [xyz]`, `only: [foo]`, an `attributes` block, or an `fn_extra` match arm — any name not present in `ALL_OPERATIONS`.","commonSituations":"Renaming/removing a libm symbol upstream; typos; referencing a function by a C name that differs from its registered operation name.","solutions":["Check the name against the current `ALL_OPERATIONS` list (or the crate's exported symbols).","Remove or correct the misspelled name.","Use the magic matchers (`ALL_F32`, `ALL_F64`, etc.) instead of listing names to avoid typos."],"exampleFix":"// before\nlibm_macros::for_each_function! {\n    callback: cb,\n    skip: [nonexistent_fn],\n}\n\n// after\nlibm_macros::for_each_function! {\n    callback: cb,\n    skip: [sin],\n}","handlingStrategy":"validation","validationCode":"// Before adding a name to skip/only/attributes/fn_extra, confirm it is a real operation.\n// (The authoritative list is api_list_common::ALL_OPERATIONS; cross-check the symbol export list.)\nfn is_known(name: &str) -> bool {\n    ALL_OPERATIONS.iter().any(|op| op.name == name)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check every function name against ALL_OPERATIONS / the exported symbol list.","Prefer ALL_F32/ALL_F64/etc. group matchers over listing names manually."],"tags":["proc-macro","libm","for-each-function","validation"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}