]> git.proxmox.com Git - rustc.git/blob - src/test/incremental/rlib_cross_crate/b.rs
New upstream version 1.35.0+dfsg1
[rustc.git] / src / test / incremental / rlib_cross_crate / b.rs
1 // Same test as `type_alias_cross_crate`, but with
2 // `no-prefer-dynamic`, ensuring that we test what happens when we
3 // build rlibs (before we were only testing dylibs, which meant we
4 // didn't realize we had to preserve a `bc` file as well).
5
6 // aux-build:a.rs
7 // revisions:rpass1 rpass2 rpass3
8 // no-prefer-dynamic
9 // compile-flags: -Z query-dep-graph
10
11 #![feature(rustc_attrs)]
12
13 extern crate a;
14
15 #[rustc_dirty(label="typeck_tables_of", cfg="rpass2")]
16 #[rustc_clean(label="typeck_tables_of", cfg="rpass3")]
17 pub fn use_X() -> u32 {
18 let x: a::X = 22;
19 x as u32
20 }
21
22 #[rustc_clean(label="typeck_tables_of", cfg="rpass2")]
23 #[rustc_clean(label="typeck_tables_of", cfg="rpass3")]
24 pub fn use_Y() {
25 let x: a::Y = 'c';
26 }
27
28 pub fn main() { }