Skip to content

Commit ab0a872

Browse files
committed
test for immediate symbol name hashing
1 parent 87debd9 commit ab0a872

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-include ../tools.mk
2+
3+
all:
4+
$(RUSTC) a.rs --cfg x -C prefer-dynamic
5+
$(RUSTC) b.rs -C prefer-dynamic
6+
$(RUSTC) a.rs --cfg y -C prefer-dynamic
7+
$(call RUN,b) 2>&1 | grep "undefined symbol"
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![crate_name = "a"]
2+
#![crate_type = "dylib"]
3+
4+
#[cfg(x)]
5+
pub fn foo(x: u32) { }
6+
7+
#[cfg(y)]
8+
pub fn foo(x: i32) { }
9+
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![crate_name = "b"]
2+
3+
extern crate a;
4+
5+
fn main() {
6+
a::foo(22_u32);
7+
}

0 commit comments

Comments
 (0)