]> git.lizzy.rs Git - rust.git/blob - tests/incremental/ich_nested_items.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / 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(except = "hir_owner_nodes", cfg = "cfail2")]
12 pub fn foo() {
13     #[cfg(cfail1)]
14     pub fn baz() {} // order is different...
15
16     #[rustc_clean(cfg = "cfail2")]
17     pub fn bar() {} // but that doesn't matter.
18
19     #[cfg(cfail2)]
20     pub fn baz() {} // order is different...
21
22     pub fn bap() {} // neither does adding a new item
23 }