Skip to content

Commit 95b0849

Browse files
incr.comp.: Adapt nested_items test to new HIR hashing rules.
1 parent fde0ca5 commit 95b0849

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/test/incremental/ich_nested_items.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
// Check that the hash of `foo` doesn't change just because we ordered
1212
// the nested items (or even added new ones).
1313

14-
// revisions: rpass1 rpass2
14+
// revisions: cfail1 cfail2
15+
// must-compile-successfully
1516

17+
#![crate_type = "rlib"]
1618
#![feature(rustc_attrs)]
1719

18-
#[cfg(rpass1)]
19-
fn foo() {
20-
fn bar() { }
21-
fn baz() { }
20+
#[cfg(cfail1)]
21+
pub fn foo() {
22+
pub fn bar() { }
23+
pub fn baz() { }
2224
}
2325

24-
#[cfg(rpass2)]
25-
#[rustc_clean(label="Hir", cfg="rpass2")]
26-
#[rustc_clean(label="HirBody", cfg="rpass2")]
27-
fn foo() {
28-
#[rustc_clean(label="Hir", cfg="rpass2")]
29-
#[rustc_clean(label="HirBody", cfg="rpass2")]
30-
fn baz() { } // order is different...
26+
#[cfg(cfail2)]
27+
#[rustc_clean(label="Hir", cfg="cfail2")]
28+
#[rustc_dirty(label="HirBody", cfg="cfail2")]
29+
pub fn foo() {
30+
#[rustc_clean(label="Hir", cfg="cfail2")]
31+
#[rustc_clean(label="HirBody", cfg="cfail2")]
32+
pub fn baz() { } // order is different...
3133

32-
#[rustc_clean(label="Hir", cfg="rpass2")]
33-
#[rustc_clean(label="HirBody", cfg="rpass2")]
34-
fn bar() { } // but that doesn't matter.
34+
#[rustc_clean(label="Hir", cfg="cfail2")]
35+
#[rustc_clean(label="HirBody", cfg="cfail2")]
36+
pub fn bar() { } // but that doesn't matter.
3537

36-
fn bap() { } // neither does adding a new item
38+
pub fn bap() { } // neither does adding a new item
3739
}
38-
39-
fn main() { }

0 commit comments

Comments
 (0)