1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
// Checks that exported items without stability attributes cause an error
#![crate_type="lib"]
#![feature(staged_api)]
#![stable(feature = "stable_test_feature", since = "1.0.0")]
pub fn unmarked() {
//~^ ERROR function has missing stability attribute
()
}
#[unstable(feature = "unstable_test_feature", issue = "none")]
pub mod foo {
// #[unstable] is inherited
pub fn unmarked() {}
}
#[stable(feature = "stable_test_feature", since="1.0.0")]
pub mod bar {
// #[stable] is not inherited
pub fn unmarked() {}
//~^ ERROR function has missing stability attribute
}
|