fn require_sync() {} //~^ NOTE required by this bound in `require_sync` //~| NOTE required by this bound in `require_sync` //~| NOTE required by this bound in `require_sync` //~| NOTE required by this bound in `require_sync` //~| NOTE required by a bound in `require_sync` //~| NOTE required by a bound in `require_sync` //~| NOTE required by a bound in `require_sync` //~| NOTE required by a bound in `require_sync` fn main() { require_sync::>(); //~^ ERROR `Cell<()>` cannot be shared between threads safely //~| NOTE `Cell<()>` cannot be shared between threads safely //~| NOTE if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` require_sync::>(); //~^ ERROR `Cell` cannot be shared between threads safely //~| NOTE `Cell` cannot be shared between threads safely //~| NOTE if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicU8` instead require_sync::>(); //~^ ERROR `Cell` cannot be shared between threads safely //~| NOTE `Cell` cannot be shared between threads safely //~| NOTE if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicI32` instead require_sync::>(); //~^ ERROR `Cell` cannot be shared between threads safely //~| NOTE `Cell` cannot be shared between threads safely //~| NOTE if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicBool` instead }