rust/tests/ui/issues/issue-21763.rs
2023-05-03 20:09:10 +03:00

13 lines
336 B
Rust

// Regression test for HashMap only impl'ing Send/Sync if its contents do
// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION"
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
}