Skip to content

Commit 13de732

Browse files
committed
add test for symbol mangling issue
1 parent 52e0bfc commit 13de732

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

tests/ui/eii/same-symbol.rs

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

0 commit comments

Comments
 (0)