mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
dc4ba57566
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
11 lines
373 B
Rust
11 lines
373 B
Rust
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
|
|
}
|