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?)
7 #![crate_type = "rlib"]
8 #![feature(rustc_attrs)]
10 #[rustc_clean(label = "hir_owner", cfg = "cfail2")]
11 #[rustc_dirty(label = "hir_owner_nodes", cfg = "cfail2")]
14 pub fn baz() {} // order is different...
16 // FIXME: Make "hir_owner" use `rustc_clean` here. Currently "hir_owner" includes a reference to
17 // the parent node, which is the statement holding this item. Changing the position of
18 // `bar` in `foo` will update that reference and make `hir_owner(bar)` dirty.
19 #[rustc_dirty(label = "hir_owner", cfg = "cfail2")]
20 #[rustc_clean(label = "hir_owner_nodes", cfg = "cfail2")]
21 pub fn bar() {} // but that doesn't matter.
24 pub fn baz() {} // order is different...
26 pub fn bap() {} // neither does adding a new item