rust/tests/ui/issues/issue-21763.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
341 B
Rust
Raw Normal View History

2015-01-30 03:18:45 +00:00
// Regression test for HashMap only impl'ing Send/Sync if its contents do
//@ normalize-stderr-test: "\S+[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION"
2015-01-30 03:18:45 +00:00
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
2015-01-30 03:18:45 +00:00
}