]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/ich_nested_items.rs
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
[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 // compile-flags: -Z query-dep-graph
7
8 #![crate_type = "rlib"]
9 #![feature(rustc_attrs)]
10
11 #[rustc_clean(label = "hir_owner", cfg = "cfail2")]
12 #[rustc_dirty(label = "hir_owner_nodes", cfg = "cfail2")]
13 pub fn foo() {
14     #[cfg(cfail1)]
15     pub fn baz() {} // order is different...
16
17     #[rustc_clean(label = "hir_owner", cfg = "cfail2")]
18     #[rustc_clean(label = "hir_owner_nodes", cfg = "cfail2")]
19     pub fn bar() {} // but that doesn't matter.
20
21     #[cfg(cfail2)]
22     pub fn baz() {} // order is different...
23
24     pub fn bap() {} // neither does adding a new item
25 }