]> git.lizzy.rs Git - rust.git/blob - tests/ui/sync/suggest-ref-cell.rs
Rollup merge of #106811 - khuey:dwp_extension, r=davidtwco
[rust.git] / tests / ui / sync / suggest-ref-cell.rs
1 #![feature(once_cell)]
2
3 fn require_sync<T: Sync>() {}
4 //~^ NOTE required by this bound in `require_sync`
5 //~| NOTE required by a bound in `require_sync`
6
7 fn main() {
8     require_sync::<std::cell::RefCell<()>>();
9     //~^ ERROR `RefCell<()>` cannot be shared between threads safely
10     //~| NOTE `RefCell<()>` cannot be shared between threads safely
11     //~| NOTE use `std::sync::RwLock` instead
12 }