1 // Check that the hash of `foo` doesn't change just because we ordered
2 // the nested items (or even added new ones).
4 // revisions: cfail1 cfail2
5 // build-pass (FIXME(62277): could be check-pass?)
6 // compile-flags: -Z query-dep-graph
8 #![crate_type = "rlib"]
9 #![feature(rustc_attrs)]
11 #[rustc_clean(label = "hir_owner", cfg = "cfail2")]
12 #[rustc_dirty(label = "hir_owner_nodes", cfg = "cfail2")]
15 pub fn baz() {} // order is different...
17 // FIXME: Make "hir_owner" use `rustc_clean` here. Currently "hir_owner" includes a reference to
18 // the parent node, which is the statement holding this item. Changing the position of
19 // `bar` in `foo` will update that reference and make `hir_owner(bar)` dirty.
20 #[rustc_dirty(label = "hir_owner", cfg = "cfail2")]
21 #[rustc_clean(label = "hir_owner_nodes", cfg = "cfail2")]
22 pub fn bar() {} // but that doesn't matter.
25 pub fn baz() {} // order is different...
27 pub fn bap() {} // neither does adding a new item