diff options
| author | bors <bors@rust-lang.org> | 2024-07-26 06:40:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-26 06:40:36 +0000 |
| commit | f98fdfc8a449bf535602b971e8eb12fd282de305 (patch) | |
| tree | f1616040f0575679c5a75a89c75ae074a1b3688f /tests/run-make/extern-diff-internal-name | |
| parent | 35e70f3e7ec31d5c8bb07f80c62559425a81979c (diff) | |
| parent | 4bd2757b4ccf6c4fed986bae9593782112aecd80 (diff) | |
Auto merge of #3765 - rust-lang:rustup-2024-07-26, r=RalfJung
Automatic Rustup
Diffstat (limited to 'tests/run-make/extern-diff-internal-name')
| -rw-r--r-- | tests/run-make/extern-diff-internal-name/Makefile | 6 | ||||
| -rw-r--r-- | tests/run-make/extern-diff-internal-name/rmake.rs | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/tests/run-make/extern-diff-internal-name/Makefile b/tests/run-make/extern-diff-internal-name/Makefile deleted file mode 100644 index 250f82dfac0..00000000000 --- a/tests/run-make/extern-diff-internal-name/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: - $(RUSTC) lib.rs - $(RUSTC) test.rs --extern foo=$(TMPDIR)/libbar.rlib diff --git a/tests/run-make/extern-diff-internal-name/rmake.rs b/tests/run-make/extern-diff-internal-name/rmake.rs new file mode 100644 index 00000000000..1a7f34d65bc --- /dev/null +++ b/tests/run-make/extern-diff-internal-name/rmake.rs @@ -0,0 +1,15 @@ +// In the following scenario: +// 1. The crate foo, is referenced multiple times +// 2. --extern foo=./path/to/libbar.rlib is specified to rustc +// 3. The internal crate name of libbar.rlib is not foo +// Compilation fails with the "multiple crate versions" error message. +// As this was fixed in #17189, this regression test ensures this bug does not +// make a resurgence. +// See https://github.com/rust-lang/rust/pull/17189 + +use run_make_support::{rust_lib_name, rustc}; + +fn main() { + rustc().input("lib.rs").run(); + rustc().input("test.rs").extern_("foo", rust_lib_name("bar")).run(); +} |
