1 // This test is meant to test that we can have a stable item in an unstable module, and that
2 // calling that item through the unstable module is unstable, but that re-exporting it from another
3 // crate in a stable module is fine.
5 // This is necessary to support moving items from `std` into `core` or `alloc` unstably while still
6 // exporting the original stable interface in `std`, such as moving `Error` into `core`.
8 // aux-build:stable-in-unstable-core.rs
9 // aux-build:stable-in-unstable-std.rs
10 #![crate_type = "lib"]
12 extern crate stable_in_unstable_core;
13 extern crate stable_in_unstable_std;
16 use stable_in_unstable_core::new_unstable_module; //~ ERROR use of unstable library feature 'unstable_test_feature'
17 use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature 'unstable_test_feature'
21 use stable_in_unstable_std::old_stable_module::OldTrait;
25 impl OldTrait for LocalType {}
29 use stable_in_unstable_core::new_unstable_module::OldTrait; //~ ERROR use of unstable library feature 'unstable_test_feature'
33 impl OldTrait for LocalType {}
39 impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalType {} //~ ERROR use of unstable library feature 'unstable_test_feature'
45 impl stable_in_unstable_std::old_stable_module::OldTrait for LocalType {}
49 use stable_in_unstable_core::new_unstable_module::{OldTrait}; //~ ERROR use of unstable library feature 'unstable_test_feature'
53 use stable_in_unstable_core::new_unstable_module::*; //~ ERROR use of unstable library feature 'unstable_test_feature'