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) {}
|
2020-04-06 05:15:06 +00:00
|
|
|
| --- required by this bound in `is_zen`
|
2019-12-26 12:43:33 +00:00
|
|
|
...
|
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
|
|
|
|
|
|
|
|
= 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>`
|
2020-03-14 02:28:14 +00:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
|
|
|
LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
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: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) {}
|
2020-04-06 05:15:06 +00:00
|
|
|
| --- required by this bound in `is_zen`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
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
|
|
|
|
|
|
|
|
= 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>>`
|
2020-03-14 02:28:14 +00:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
|
|
|
LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|