Skip to content

Commit a65ed53

Browse files
committed
add test for symbol mangling issue
1 parent 34bbd26 commit a65ed53

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/ui/eii/same-symbol.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//@ run-pass
2+
//@ check-run-results
3+
#![feature(extern_item_impls)]
4+
5+
pub mod a {
6+
#[eii(foo)]
7+
pub fn foo();
8+
}
9+
10+
pub mod b {
11+
#[eii(foo)]
12+
pub fn foo();
13+
}
14+
15+
#[a::foo]
16+
fn a_foo_impl() {
17+
println!("foo1");
18+
}
19+
20+
#[b::foo]
21+
fn b_foo_impl() {
22+
println!("foo2");
23+
}
24+
25+
fn main() {
26+
a::foo();
27+
b::foo();
28+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
foo1
2+
foo2

0 commit comments

Comments
 (0)