add test for symbol mangling issue
This commit is contained in:
parent
52e0bfccb0
commit
13de732df5
2 changed files with 31 additions and 0 deletions
29
tests/ui/eii/same-symbol.rs
Normal file
29
tests/ui/eii/same-symbol.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
//@ run-pass
|
||||
//@ check-run-results
|
||||
//@ ignore-backends: gcc
|
||||
#![feature(extern_item_impls)]
|
||||
|
||||
pub mod a {
|
||||
#[eii(foo)]
|
||||
pub fn foo();
|
||||
}
|
||||
|
||||
pub mod b {
|
||||
#[eii(foo)]
|
||||
pub fn foo();
|
||||
}
|
||||
|
||||
#[a::foo]
|
||||
fn a_foo_impl() {
|
||||
println!("foo1");
|
||||
}
|
||||
|
||||
#[b::foo]
|
||||
fn b_foo_impl() {
|
||||
println!("foo2");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
a::foo();
|
||||
b::foo();
|
||||
}
|
||||
2
tests/ui/eii/same-symbol.run.stdout
Normal file
2
tests/ui/eii/same-symbol.run.stdout
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
foo1
|
||||
foo1
|
||||
Loading…
Add table
Add a link
Reference in a new issue