1 // run-pass
2 // Test that using rlibs and rmeta dep crates work together. Specifically, that
3 // there can be both an rmeta and an rlib file and rustc will prefer the rmeta
4 // file.
5 //
6 // This behavior is simply making sure this doesn't accidentally change; in this
7 // case we want to make sure that the rlib isn't being used as that would cause
8 // bugs in -Zbinary-dep-depinfo (see #68298).
9 
10 // aux-build:rmeta-rmeta.rs
11 // aux-build:rmeta-rlib-rpass.rs
12 
13 extern crate rmeta_aux;
14 use rmeta_aux::Foo;
15 
main()16 pub fn main() {
17     let _ = Foo { field2: 42 };
18 }
19