mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
25 lines
595 B
Rust
25 lines
595 B
Rust
// 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
|
|
}
|