summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21763.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-21763.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-21763.rs b/src/test/ui/issues/issue-21763.rs
new file mode 100644
index 000000000..5beb1d8b8
--- /dev/null
+++ b/src/test/ui/issues/issue-21763.rs
@@ -0,0 +1,11 @@
+// Regression test for HashMap only impl'ing Send/Sync if its contents do
+
+use std::collections::HashMap;
+use std::rc::Rc;
+
+fn foo<T: Send>() {}
+
+fn main() {
+ foo::<HashMap<Rc<()>, Rc<()>>>();
+ //~^ ERROR `Rc<()>` cannot be sent between threads safely
+}