4 # compile two different versions of crateA
5 $(RUSTC) --crate-type=rlib crateA.rs -C metadata=-1 -C extra-filename=-1
6 $(RUSTC) --crate-type=rlib crateA.rs -C metadata=-2 -C extra-filename=-2
7 # make crateB depend on version 1 of crateA
8 $(RUSTC) --crate-type=rlib crateB.rs --extern crateA=$(TMPDIR)/libcrateA-1.rlib
9 # make crateC depend on version 2 of crateA
10 $(RUSTC) crateC.rs --extern crateA=$(TMPDIR)/libcrateA-2.rlib 2>&1 | \
11 tr -d '\r\n' | $(CGREP) -e \
13 crateB::try_foo\(foo2\);.*\
14 expected struct \`crateA::foo::Foo\`, found struct \`Foo\`.*\
15 different versions of crate \`crateA\`.*\
17 crateB::try_bar\(bar2\);.*\
18 expected trait \`crateA::bar::Bar\`, found trait \`Bar\`.*\
19 different versions of crate \`crateA\`"