blob: 093a4999c6501e89401498967d53f9f95dc9c6e2 (
plain)
1
2
3
4
5
6
7
8
9
10
|
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
}
|