]> git.lizzy.rs Git - rust.git/blob - tests/incremental/crate_hash_reorder.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / 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(cfg = "rpass2")]
11 // But removing an item, naturally, is.
12 #[rustc_clean(except="hir_crate", cfg = "rpass3")]
13 #[cfg(rpass1)]
14 pub struct X {
15     pub x: u32,
16 }
17
18 pub struct Y {
19     pub x: u32,
20 }
21
22 #[cfg(rpass2)]
23 pub struct X {
24     pub x: u32,
25 }
26
27 pub fn main() {}