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