1 // Allow an unstable re-export without requiring a feature gate.
4 // aux-build:lint-stability.rs
5 // aux-build:lint-stability-reexport.rs
6 #![feature(staged_api)]
7 #![stable(feature = "lint_stability", since = "1.0.0")]
9 extern crate lint_stability;
10 extern crate lint_stability_reexport;
12 #[unstable(feature = "unstable_test_feature", issue = "none")]
13 pub use lint_stability::unstable;
15 // We want to confirm that using a re-export through another crate behaves
16 // the same way as using an item directly
17 #[unstable(feature = "unstable_test_feature", issue = "none")]
18 pub use lint_stability_reexport::unstable_text;
20 // Ensure items which aren't marked as unstable can't re-export unstable items
21 #[stable(feature = "lint_stability", since = "1.0.0")]
22 pub use lint_stability::unstable as unstable2;
23 //~^ ERROR use of unstable library feature 'unstable_test_feature'
26 // Since we didn't enable the feature in this crate, we still can't
27 // use these items, even though they're in scope from the `use`s which are now allowed.
28 unstable(); //~ ERROR use of unstable library feature 'unstable_test_feature'
29 unstable_text(); //~ ERROR use of unstable library feature 'unstable_test_feature'