about summary refs log tree commit diff
path: root/tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs')
-rw-r--r--tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs b/tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs
new file mode 100644
index 00000000000..8be214b5324
--- /dev/null
+++ b/tests/ui/unstable-feature-bound/unstable-feature-cross-crate-require-bound.rs
@@ -0,0 +1,14 @@
+//@ aux-build:unstable_feature.rs
+//@ revisions: pass fail
+//@[pass] check-pass
+
+#![cfg_attr(pass, feature(feat_bar))]
+extern crate unstable_feature;
+use unstable_feature::{Foo, Bar};
+
+/// #[feature(..)] is required to use unstable impl.
+
+fn main() {
+    Bar::foo();
+    //[fail]~^ ERROR: use of unstable library feature `feat_bar` [E0658]
+}