rust/src/test/ui/issues/issue-21763.rs
2018-12-25 21:08:33 -07:00

12 lines
269 B
Rust

// 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 `std::rc::Rc<()>` cannot be sent between threads safely
}