summaryrefslogtreecommitdiffstats
path: root/tests/ui/sync/suggest-ref-cell.rs
blob: 6b972ae09622efe6cd36e1efb49dd2214c3c5724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(once_cell)]

fn require_sync<T: Sync>() {}
//~^ NOTE required by this bound in `require_sync`
//~| NOTE required by a bound in `require_sync`

fn main() {
    require_sync::<std::cell::RefCell<()>>();
    //~^ ERROR `RefCell<()>` cannot be shared between threads safely
    //~| NOTE `RefCell<()>` cannot be shared between threads safely
    //~| NOTE use `std::sync::RwLock` instead
}