1 // Testing gating of `#[unstable]` in "weird" places.
3 // This file sits on its own because these signal errors, making
4 // this test incompatible with the "warnings only" nature of
5 // issue-43106-gating-of-builtin-attrs.rs
8 //~^ ERROR stability attributes may not be used outside of the standard library
11 //~^ ERROR stability attributes may not be used outside of the standard library
13 mod inner { #![unstable()] }
14 //~^ ERROR stability attributes may not be used outside of the standard library
16 #[unstable()] fn f() { }
17 //~^ ERROR stability attributes may not be used outside of the standard library
19 #[unstable()] struct S;
20 //~^ ERROR stability attributes may not be used outside of the standard library
21 //~| ERROR stability attributes may not be used outside of the standard library
23 #[unstable()] type T = S;
24 //~^ ERROR stability attributes may not be used outside of the standard library
26 #[unstable()] impl S { }
27 //~^ ERROR stability attributes may not be used outside of the standard library