2016-07-27 14:42:58 -04:00
|
|
|
// Check that the hash of `foo` doesn't change just because we ordered
|
|
|
|
// the nested items (or even added new ones).
|
|
|
|
|
2017-11-08 11:32:16 +01:00
|
|
|
// revisions: cfail1 cfail2
|
2018-04-02 13:20:06 +02:00
|
|
|
// compile-pass
|
2016-07-27 14:42:58 -04:00
|
|
|
|
2017-11-08 11:32:16 +01:00
|
|
|
#![crate_type = "rlib"]
|
2016-07-27 14:42:58 -04:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
2017-11-08 11:32:16 +01:00
|
|
|
#[rustc_clean(label="Hir", cfg="cfail2")]
|
|
|
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
|
|
|
pub fn foo() {
|
2017-12-04 12:47:16 +01:00
|
|
|
#[cfg(cfail1)]
|
2017-11-08 11:32:16 +01:00
|
|
|
pub fn baz() { } // order is different...
|
2016-07-27 14:42:58 -04:00
|
|
|
|
2017-11-08 11:32:16 +01:00
|
|
|
#[rustc_clean(label="Hir", cfg="cfail2")]
|
|
|
|
#[rustc_clean(label="HirBody", cfg="cfail2")]
|
|
|
|
pub fn bar() { } // but that doesn't matter.
|
2016-07-27 14:42:58 -04:00
|
|
|
|
2017-12-04 12:47:16 +01:00
|
|
|
#[cfg(cfail2)]
|
|
|
|
pub fn baz() { } // order is different...
|
|
|
|
|
2017-11-08 11:32:16 +01:00
|
|
|
pub fn bap() { } // neither does adding a new item
|
2016-07-27 14:42:58 -04:00
|
|
|
}
|