summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/alias/cross-crate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/alias/cross-crate.rs')
-rw-r--r--tests/ui/traits/alias/cross-crate.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/traits/alias/cross-crate.rs b/tests/ui/traits/alias/cross-crate.rs
new file mode 100644
index 000000000..8919c6434
--- /dev/null
+++ b/tests/ui/traits/alias/cross-crate.rs
@@ -0,0 +1,17 @@
+// aux-build:send_sync.rs
+
+#![feature(trait_alias)]
+
+extern crate send_sync;
+
+use std::rc::Rc;
+use send_sync::SendSync;
+
+fn use_alias<T: SendSync>() {}
+
+fn main() {
+ use_alias::<u32>();
+ use_alias::<Rc<u32>>();
+ //~^ ERROR `Rc<u32>` cannot be sent between threads safely [E0277]
+ //~^^ ERROR `Rc<u32>` cannot be shared between threads safely [E0277]
+}