2019-01-01 23:21:05 +00:00
|
|
|
// Various checks that stability attributes are used correctly, per RFC 507
|
|
|
|
|
|
|
|
#![feature(staged_api)]
|
|
|
|
|
|
|
|
#![stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
|
|
|
|
mod bogus_attribute_types_2 {
|
2019-05-22 00:47:23 +00:00
|
|
|
#[unstable] //~ ERROR malformed `unstable` attribute
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f1() { }
|
|
|
|
|
2019-05-22 00:47:23 +00:00
|
|
|
#[unstable = "b"] //~ ERROR malformed `unstable` attribute
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f2() { }
|
|
|
|
|
2019-05-22 00:47:23 +00:00
|
|
|
#[stable] //~ ERROR malformed `stable` attribute
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f3() { }
|
|
|
|
|
2019-05-22 00:47:23 +00:00
|
|
|
#[stable = "a"] //~ ERROR malformed `stable` attribute
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f4() { }
|
|
|
|
|
2023-10-16 20:11:26 +00:00
|
|
|
#[stable(feature = "a", since = "3.3.3")]
|
2022-03-05 02:59:18 +00:00
|
|
|
#[deprecated] //~ ERROR missing 'since'
|
2023-10-30 22:44:09 +00:00
|
|
|
//~^ ERROR missing 'note'
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f5() { }
|
|
|
|
|
2023-10-16 20:11:26 +00:00
|
|
|
#[stable(feature = "a", since = "3.3.3")]
|
2022-03-05 02:59:18 +00:00
|
|
|
#[deprecated = "a"] //~ ERROR missing 'since'
|
2019-01-01 23:21:05 +00:00
|
|
|
fn f6() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|