2017-07-11 07:30:10 -05:00
|
|
|
// Testing gating of `#[unstable]` in "weird" places.
|
|
|
|
//
|
|
|
|
// This file sits on its own because these signal errors, making
|
|
|
|
// this test incompatible with the "warnings only" nature of
|
|
|
|
// issue-43106-gating-of-builtin-attrs.rs
|
|
|
|
|
2019-01-01 17:21:05 -06:00
|
|
|
#![unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
|
2019-01-01 17:21:05 -06:00
|
|
|
#[unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
mod unstable {
|
2022-01-18 13:37:14 -06:00
|
|
|
mod inner {
|
|
|
|
#![unstable()]
|
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
}
|
2017-07-11 07:30:10 -05:00
|
|
|
|
2022-01-18 13:37:14 -06:00
|
|
|
#[unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 13:37:14 -06:00
|
|
|
fn f() {}
|
2017-07-11 07:30:10 -05:00
|
|
|
|
2022-01-18 13:37:14 -06:00
|
|
|
#[unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 13:37:14 -06:00
|
|
|
struct S;
|
2017-07-11 07:30:10 -05:00
|
|
|
|
2022-01-18 13:37:14 -06:00
|
|
|
#[unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 13:37:14 -06:00
|
|
|
type T = S;
|
2017-07-11 07:30:10 -05:00
|
|
|
|
2022-01-18 13:37:14 -06:00
|
|
|
#[unstable()]
|
2017-07-11 07:30:10 -05:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 13:37:14 -06:00
|
|
|
impl S {}
|
2017-07-11 07:30:10 -05:00
|
|
|
}
|
2018-03-12 15:21:43 -05:00
|
|
|
|
|
|
|
fn main() {}
|