]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_calls/exported_symbol_clashing.rs
Rollup merge of #102055 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / tools / miri / tests / fail / function_calls / exported_symbol_clashing.rs
1 #[no_mangle]
2 fn foo() {}
3 //~^ HELP: it's first defined here, in crate `exported_symbol_clashing`
4
5 #[export_name = "foo"]
6 fn bar() {}
7 //~^ HELP: then it's defined here again, in crate `exported_symbol_clashing`
8
9 fn main() {
10     extern "Rust" {
11         fn foo();
12     }
13     unsafe { foo() }
14     //~^ ERROR: multiple definitions of symbol `foo`
15 }