summaryrefslogtreecommitdiffstats
path: root/tests/ui/offset-of/offset-of-unstable-with-feature.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/offset-of/offset-of-unstable-with-feature.rs')
-rw-r--r--tests/ui/offset-of/offset-of-unstable-with-feature.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/offset-of/offset-of-unstable-with-feature.rs b/tests/ui/offset-of/offset-of-unstable-with-feature.rs
new file mode 100644
index 000000000..7d2eb46c0
--- /dev/null
+++ b/tests/ui/offset-of/offset-of-unstable-with-feature.rs
@@ -0,0 +1,20 @@
+// check-pass
+// aux-build:offset-of-staged-api.rs
+
+#![feature(offset_of, unstable_test_feature)]
+
+use std::mem::offset_of;
+
+extern crate offset_of_staged_api;
+
+use offset_of_staged_api::*;
+
+fn main() {
+ offset_of!(Unstable, unstable);
+ offset_of!(Stable, stable);
+ offset_of!(StableWithUnstableField, unstable);
+ offset_of!(StableWithUnstableFieldType, stable);
+ offset_of!(StableWithUnstableFieldType, stable.unstable);
+ offset_of!(UnstableWithStableFieldType, unstable);
+ offset_of!(UnstableWithStableFieldType, unstable.stable);
+}