<!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #[unsafe(no_mangle)] #[track_caller] pub fn foo() {} fn main() { let _a = foo as fn(); } ``` **I expected to see this happen:** I’m not sure, but not what actually happened **Instead, this happened:** ``` error: symbol `foo` is already defined --> src/main.rs:3:1 | 3 | pub fn foo() {} | ^^^^^^^^^^^^ ``` ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --version`: ``` 1.88.0 ``` @rustbot label A-name-mangling A-linkage