summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21763.rs
blob: 38103ff4f9c8549d10bb90cd68e186ccfabd9fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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
}