]>
Commit | Line | Data |
---|---|---|
8bb4bdeb XL |
1 | // revisions: rpass1 cfail2 |
2 | // compile-flags: -Z query-dep-graph | |
3 | ||
4 | #![allow(warnings)] | |
5 | #![feature(rustc_attrs)] | |
6 | ||
17df50a5 | 7 | // Sanity check for the dirty-clean system. We add #[rustc_clean] |
8bb4bdeb XL |
8 | // attributes in places that are not checked and make sure that this causes an |
9 | // error. | |
10 | ||
11 | fn main() { | |
12 | ||
17df50a5 XL |
13 | #[rustc_clean(except="hir_owner", cfg="cfail2")] |
14 | //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute | |
8bb4bdeb XL |
15 | { |
16 | // empty block | |
17 | } | |
18 | ||
17df50a5 XL |
19 | #[rustc_clean(cfg="cfail2")] |
20 | //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute | |
8bb4bdeb XL |
21 | { |
22 | // empty block | |
23 | } | |
24 | } | |
25 | ||
26 | struct _Struct { | |
17df50a5 XL |
27 | #[rustc_clean(except="hir_owner", cfg="cfail2")] |
28 | //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute | |
8bb4bdeb XL |
29 | _field1: i32, |
30 | ||
17df50a5 XL |
31 | #[rustc_clean(cfg="cfail2")] |
32 | //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute | |
8bb4bdeb XL |
33 | _field2: i32, |
34 | } |