]> git.lizzy.rs Git - rust.git/blob - src/test/ui/missing/missing-stability.rs
Auto merge of #97657 - Urgau:check-cfg-many-mut, r=oli-obk
[rust.git] / src / test / ui / missing / missing-stability.rs
1 // Checks that exported items without stability attributes cause an error
2
3 #![crate_type="lib"]
4 #![feature(staged_api)]
5
6 #![stable(feature = "stable_test_feature", since = "1.0.0")]
7
8 pub fn unmarked() {
9     //~^ ERROR function has missing stability attribute
10     ()
11 }
12
13 #[unstable(feature = "unstable_test_feature", issue = "none")]
14 pub mod foo {
15     // #[unstable] is inherited
16     pub fn unmarked() {}
17 }
18
19 #[stable(feature = "stable_test_feature", since="1.0.0")]
20 pub mod bar {
21     // #[stable] is not inherited
22     pub fn unmarked() {}
23     //~^ ERROR function has missing stability attribute
24 }