2017-07-11 12:30:10 +00: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 23:21:05 +00:00
|
|
|
#![unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
|
2019-01-01 23:21:05 +00:00
|
|
|
#[unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
mod unstable {
|
2022-01-18 19:37:14 +00:00
|
|
|
mod inner {
|
|
|
|
#![unstable()]
|
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
|
|
|
}
|
2017-07-11 12:30:10 +00:00
|
|
|
|
2022-01-18 19:37:14 +00:00
|
|
|
#[unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 19:37:14 +00:00
|
|
|
fn f() {}
|
2017-07-11 12:30:10 +00:00
|
|
|
|
2022-01-18 19:37:14 +00:00
|
|
|
#[unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 19:37:14 +00:00
|
|
|
struct S;
|
2017-07-11 12:30:10 +00:00
|
|
|
|
2022-01-18 19:37:14 +00:00
|
|
|
#[unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 19:37:14 +00:00
|
|
|
type T = S;
|
2017-07-11 12:30:10 +00:00
|
|
|
|
2022-01-18 19:37:14 +00:00
|
|
|
#[unstable()]
|
2017-07-11 12:30:10 +00:00
|
|
|
//~^ ERROR stability attributes may not be used outside of the standard library
|
2022-01-18 19:37:14 +00:00
|
|
|
impl S {}
|
2017-07-11 12:30:10 +00:00
|
|
|
}
|
2018-03-12 20:21:43 +00:00
|
|
|
|
|
|
|
fn main() {}
|