2015-01-29 21:18:45 -06:00
|
|
|
// 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<()>>>();
|
2018-06-09 18:53:36 -05:00
|
|
|
//~^ ERROR `std::rc::Rc<()>` cannot be sent between threads safely
|
2015-01-29 21:18:45 -06:00
|
|
|
}
|