File tree Expand file tree Collapse file tree 5 files changed +21
-23
lines changed Expand file tree Collapse file tree 5 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 1+ # ignore-cross-compile
2+ include ../tools.mk
3+
4+ # Test that using rlibs and rmeta dep crates work together. Specifically, that
5+ # there can be both an rmeta and an rlib file and rustc will prefer the rmeta
6+ # file.
7+ #
8+ # This behavior is simply making sure this doesn't accidentally change; in this
9+ # case we want to make sure that the rlib isn't being used as that would cause
10+ # bugs in -Zbinary-dep-depinfo (see #68298).
11+
12+ all :
13+ $(RUSTC ) rmeta_aux.rs --crate-type=rlib --emit link,metadata
14+ $(RUSTC ) lib.rs --crate-type=rlib --emit dep-info -Zbinary-dep-depinfo
15+ $(CGREP ) " librmeta_aux.rmeta" < $(TMPDIR ) /lib.d
16+ $(CGREP ) -v " librmeta_aux.rlib" < $(TMPDIR ) /lib.d
Original file line number Diff line number Diff line change 1- // run-pass
21// Test that using rlibs and rmeta dep crates work together. Specifically, that
32// there can be both an rmeta and an rlib file and rustc will prefer the rmeta
43// file.
76// case we want to make sure that the rlib isn't being used as that would cause
87// bugs in -Zbinary-dep-depinfo (see #68298).
98
10- // aux-build:rmeta-rmeta.rs
11- // aux-build:rmeta-rlib-rpass.rs
12-
139extern crate rmeta_aux;
1410use rmeta_aux:: Foo ;
1511
16- pub fn main ( ) {
17- let _ = Foo { field2 : 42 } ;
12+ pub fn foo ( ) {
13+ let _ = Foo { field : 42 } ;
1814}
Original file line number Diff line number Diff line change 1+ pub struct Foo {
2+ pub field : i32 ,
3+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments