fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
675 B15 linesraw
1error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
2  --> $DIR/mutexguard-sync.rs:11:15
3   |
4LL | fn test_sync<T: Sync>(_t: T) {}
5   |    ---------    ---- required by this bound in `test_sync`
6...
7LL |     test_sync(guard);
8   |               ^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
9   |
10   = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
11   = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::MutexGuard<'_, std::cell::Cell<i32>>`
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0277`.