fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0277]: `T` cannot be shared between threads safely 2 --> $DIR/phantom-oibit.rs:21:12 3 | 4LL | fn is_zen<T: Zen>(_: T) {} 5 | ------ --- required by this bound in `is_zen` 6LL | 7LL | fn not_sync<T>(x: Guard<T>) { 8 | - help: consider restricting this bound: `T: std::marker::Sync` 9LL | is_zen(x) 10 | ^ `T` cannot be shared between threads safely 11 | 12 = help: the trait `std::marker::Sync` is not implemented for `T` 13 = note: required because of the requirements on the impl of `Zen` for `&T` 14 = note: required because it appears within the type `std::marker::PhantomData<&T>` 15 = note: required because it appears within the type `Guard<'_, T>` 16 17error[E0277]: `T` cannot be shared between threads safely 18 --> $DIR/phantom-oibit.rs:26:12 19 | 20LL | fn is_zen<T: Zen>(_: T) {} 21 | ------ --- required by this bound in `is_zen` 22... 23LL | fn nested_not_sync<T>(x: Nested<Guard<T>>) { 24 | - help: consider restricting this bound: `T: std::marker::Sync` 25LL | is_zen(x) 26 | ^ `T` cannot be shared between threads safely 27 | 28 = help: the trait `std::marker::Sync` is not implemented for `T` 29 = note: required because of the requirements on the impl of `Zen` for `&T` 30 = note: required because it appears within the type `std::marker::PhantomData<&T>` 31 = note: required because it appears within the type `Guard<'_, T>` 32 = note: required because it appears within the type `Nested<Guard<'_, T>>` 33 34error: aborting due to 2 previous errors 35 36For more information about this error, try `rustc --explain E0277`.