summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-staged_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/feature-gates/feature-gate-staged_api.rs')
-rw-r--r--src/test/ui/feature-gates/feature-gate-staged_api.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-staged_api.rs b/src/test/ui/feature-gates/feature-gate-staged_api.rs
new file mode 100644
index 000000000..2571ab5d1
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-staged_api.rs
@@ -0,0 +1,14 @@
+#![stable(feature = "a", since = "b")]
+//~^ ERROR stability attributes may not be used outside of the standard library
+mod inner_private_module {
+ // UnnameableTypeAlias isn't marked as reachable, so no stability annotation is required here
+ pub type UnnameableTypeAlias = u8;
+}
+
+#[stable(feature = "a", since = "b")]
+//~^ ERROR stability attributes may not be used outside of the standard library
+pub fn f() -> inner_private_module::UnnameableTypeAlias {
+ 0
+}
+
+fn main() {}