2015-02-04 00:30:54 +05:30
|
|
|
// Checks that exported items without stability attributes cause an error
|
|
|
|
|
|
|
|
#![crate_type="lib"]
|
|
|
|
#![feature(staged_api)]
|
|
|
|
|
2018-07-23 12:22:23 +01:00
|
|
|
#![stable(feature = "stable_test_feature", since = "1.0.0")]
|
2015-11-16 19:54:28 +03:00
|
|
|
|
2015-02-04 00:30:54 +05:30
|
|
|
pub fn unmarked() {
|
2019-02-08 14:30:13 +01:00
|
|
|
//~^ ERROR function has missing stability attribute
|
2015-02-04 00:30:54 +05:30
|
|
|
()
|
|
|
|
}
|
|
|
|
|
2019-12-21 13:16:18 +02:00
|
|
|
#[unstable(feature = "unstable_test_feature", issue = "none")]
|
2015-02-04 00:30:54 +05:30
|
|
|
pub mod foo {
|
|
|
|
// #[unstable] is inherited
|
|
|
|
pub fn unmarked() {}
|
|
|
|
}
|
|
|
|
|
2018-07-23 12:22:23 +01:00
|
|
|
#[stable(feature = "stable_test_feature", since="1.0.0")]
|
2015-02-04 00:30:54 +05:30
|
|
|
pub mod bar {
|
|
|
|
// #[stable] is not inherited
|
|
|
|
pub fn unmarked() {}
|
2019-02-08 14:30:13 +01:00
|
|
|
//~^ ERROR function has missing stability attribute
|
2015-02-17 15:10:25 -08:00
|
|
|
}
|