2018-08-08 12:28:26 +00:00
|
|
|
error[E0277]: `T` cannot be shared between threads safely
|
2019-09-16 04:58:20 +00:00
|
|
|
--> $DIR/phantom-oibit.rs:21:12
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn is_zen<T: Zen>(_: T) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ------ --- required by this bound in `is_zen`
|
2019-10-07 21:23:56 +00:00
|
|
|
LL |
|
|
|
|
LL | fn not_sync<T>(x: Guard<T>) {
|
|
|
|
| - help: consider restricting this bound: `T: std::marker::Sync`
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | is_zen(x)
|
2019-09-16 04:58:20 +00:00
|
|
|
| ^ `T` cannot be shared between threads safely
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sync` is not implemented for `T`
|
|
|
|
= note: required because of the requirements on the impl of `Zen` for `&T`
|
|
|
|
= note: required because it appears within the type `std::marker::PhantomData<&T>`
|
|
|
|
= note: required because it appears within the type `Guard<'_, T>`
|
|
|
|
|
|
|
|
error[E0277]: `T` cannot be shared between threads safely
|
2019-09-16 04:58:20 +00:00
|
|
|
--> $DIR/phantom-oibit.rs:26:12
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn is_zen<T: Zen>(_: T) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ------ --- required by this bound in `is_zen`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2019-10-07 21:23:56 +00:00
|
|
|
LL | fn nested_not_sync<T>(x: Nested<Guard<T>>) {
|
|
|
|
| - help: consider restricting this bound: `T: std::marker::Sync`
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | is_zen(x)
|
2019-09-16 04:58:20 +00:00
|
|
|
| ^ `T` cannot be shared between threads safely
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sync` is not implemented for `T`
|
|
|
|
= note: required because of the requirements on the impl of `Zen` for `&T`
|
|
|
|
= note: required because it appears within the type `std::marker::PhantomData<&T>`
|
|
|
|
= note: required because it appears within the type `Guard<'_, T>`
|
|
|
|
= note: required because it appears within the type `Nested<Guard<'_, T>>`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|