summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21763.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-21763.rs')
-rw-r--r--tests/ui/issues/issue-21763.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs
new file mode 100644
index 000000000..5beb1d8b8
--- /dev/null
+++ b/tests/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
+}