]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/ich_nested_items.rs
Update const_forget.rs
[rust.git] / src / test / incremental / ich_nested_items.rs
1 // Check that the hash of `foo` doesn't change just because we ordered
2 // the nested items (or even added new ones).
3
4 // revisions: cfail1 cfail2
5 // build-pass (FIXME(62277): could be check-pass?)
6
7 #![crate_type = "rlib"]
8 #![feature(rustc_attrs)]
9
10 #[rustc_clean(label="Hir", cfg="cfail2")]
11 #[rustc_dirty(label="HirBody", cfg="cfail2")]
12 pub fn foo() {
13     #[cfg(cfail1)]
14     pub fn baz() { } // order is different...
15
16     #[rustc_clean(label="Hir", cfg="cfail2")]
17     #[rustc_clean(label="HirBody", cfg="cfail2")]
18     pub fn bar() { } // but that doesn't matter.
19
20     #[cfg(cfail2)]
21     pub fn baz() { } // order is different...
22
23     pub fn bap() { } // neither does adding a new item
24 }