From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- .../no-mangle-in-proc-macro-issue-111888.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs (limited to 'tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs') diff --git a/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs new file mode 100644 index 000000000..4e5208e50 --- /dev/null +++ b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs @@ -0,0 +1,22 @@ +// build-pass +// force-host +// no-prefer-dynamic +// aux-build:exports_no_mangle.rs +#![crate_type = "proc-macro"] + +// Issue #111888: this proc-macro crate imports another crate that itself +// exports a no_mangle function. +// +// That combination was broken for a period of time, because: +// +// In PR #99944 we *stopped* exporting no_mangle symbols from +// proc-macro crates. The constructed linker version script still referred +// to them, but resolving that discrepancy was left as a FIXME in the code. +// +// In PR #108017 we started telling the linker to check (via the +// `--no-undefined-version` linker invocation flag) that every symbol referenced +// in the "linker version script" is actually present in the linker input. So +// the unresolved discrepancy from #99944 started surfacing as a compile-time +// error. + +extern crate exports_no_mangle; -- cgit v1.2.3