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