mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
12 lines
260 B
Rust
12 lines
260 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 `Rc<()>` cannot be sent between threads safely
|
|
}
|