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