about summary refs log tree commit diff
path: root/tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs')
-rw-r--r--tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs b/tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs
new file mode 100644
index 00000000000..b597009a309
--- /dev/null
+++ b/tests/ui/stability-attribute/auxiliary/allowed-through-unstable-core.rs
@@ -0,0 +1,14 @@
+#![crate_type = "lib"]
+#![feature(staged_api)]
+#![feature(rustc_attrs)]
+#![stable(feature = "stable_test_feature", since = "1.2.0")]
+
+#[unstable(feature = "unstable_test_feature", issue = "1")]
+pub mod unstable_module {
+    #[stable(feature = "stable_test_feature", since = "1.2.0")]
+    #[rustc_allowed_through_unstable_modules]
+    pub trait OldStableTraitAllowedThoughUnstable {}
+
+    #[stable(feature = "stable_test_feature", since = "1.2.0")]
+    pub trait NewStableTraitNotAllowedThroughUnstable {}
+}