diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/run-make/type-mismatch-same-crate-name/Makefile | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/type-mismatch-same-crate-name/Makefile')
-rw-r--r-- | tests/run-make/type-mismatch-same-crate-name/Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/run-make/type-mismatch-same-crate-name/Makefile b/tests/run-make/type-mismatch-same-crate-name/Makefile new file mode 100644 index 000000000..a2a2a41c7 --- /dev/null +++ b/tests/run-make/type-mismatch-same-crate-name/Makefile @@ -0,0 +1,19 @@ +include ../tools.mk + +all: + # compile two different versions of crateA + $(RUSTC) --crate-type=rlib crateA.rs -C metadata=-1 -C extra-filename=-1 + $(RUSTC) --crate-type=rlib crateA.rs -C metadata=-2 -C extra-filename=-2 + # make crateB depend on version 1 of crateA + $(RUSTC) --crate-type=rlib crateB.rs --extern crateA=$(TMPDIR)/libcrateA-1.rlib + # make crateC depend on version 2 of crateA + $(RUSTC) crateC.rs --extern crateA=$(TMPDIR)/libcrateA-2.rlib 2>&1 | \ + tr -d '\r\n' | $(CGREP) -e \ + "mismatched types.*\ + crateB::try_foo\(foo2\);.*\ + expected \`crateA::foo::Foo\`, found \`Foo\`.*\ + different versions of crate \`crateA\`.*\ + mismatched types.*\ + crateB::try_bar\(bar2\);.*\ + expected trait \`crateA::bar::Bar\`, found trait \`Bar\`.*\ + different versions of crate \`crateA\`" |