Skip to content

Commit 7a0e2ee

Browse files
committed
regression test for issue 111888.
1 parent 3000c24 commit 7a0e2ee

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![crate_type="lib"]
2+
3+
// Issue 111888: this crate (1.) is imported by a proc-macro crate and (2.)
4+
// exports a no_mangle function; that combination of acts was broken for some
5+
// period of time. See further discussion in the test file that imports this
6+
// crate.
7+
8+
#[no_mangle]
9+
pub fn some_no_mangle_function() { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// run-pass
2+
// aux-build:exports_no_mangle.rs
3+
#![crate_type = "proc-macro"]
4+
5+
// Issue #111888: this proc-macro crate imports another crate that itself
6+
// exports a no_mangle function.
7+
//
8+
// That combination was broken for a period of time, because:
9+
//
10+
// In PR #99944 we *stopped* exporting no_mangle symbols from
11+
// proc-macro crates. The constructed linker version script still referred
12+
// to them, but resolving that discrepancy was left as a FIXME in the code.
13+
//
14+
// In PR #108017 we started telling the linker to check (via the
15+
// `--no-undefined-version` linker invocation flag) that every symbol referenced
16+
// in the "linker version script" is actually present in the linker input. So
17+
// the unresolved discrepancy from #99944 started surfacing as a compile-time
18+
// error.
19+
20+
extern crate exports_no_mangle;

0 commit comments

Comments
 (0)