]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/crate_hash_reorder.rs
Update dependencies
[rust.git] / src / test / incremental / crate_hash_reorder.rs
1 // Test that the crate hash is not affected by reordering items.
2
3 // revisions:rpass1 rpass2 rpass3
4 // compile-flags: -Z query-dep-graph
5
6 #![feature(rustc_attrs)]
7
8 // Check that reordering otherwise identical items is not considered a
9 // change at all.
10 #[rustc_clean(label="Krate", cfg="rpass2")]
11
12 // But removing an item, naturally, is.
13 #[rustc_dirty(label="Krate", cfg="rpass3")]
14
15 #[cfg(rpass1)]
16 pub struct X {
17     pub x: u32,
18 }
19
20 pub struct Y {
21     pub x: u32,
22 }
23
24 #[cfg(rpass2)]
25 pub struct X {
26     pub x: u32,
27 }
28
29 pub fn main() { }