summaryrefslogtreecommitdiffstats
path: root/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/stability-attribute/stability-attribute-issue-43027.rs')
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-issue-43027.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs b/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs
new file mode 100644
index 000000000..3f4fdfd01
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs
@@ -0,0 +1,15 @@
+// check-pass
+#![feature(staged_api)]
+#![stable(feature = "test", since = "0")]
+
+#[stable(feature = "test", since = "0")]
+pub struct A<T>(pub T);
+
+#[stable(feature = "test", since = "0")]
+pub struct B<T>(#[stable(feature = "test", since = "0")] pub T);
+
+fn main() {
+ // Make sure the field is used to fill the stability cache
+ A(0).0;
+ B(0).0;
+}