rust/src/test/ui/phantom-oibit.stderr

39 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0277]: `T` cannot be shared between threads safely
2018-12-25 16:56:47 +01:00
--> $DIR/phantom-oibit.rs:21:5
2018-08-08 14:28:26 +02:00
|
LL | is_zen(x)
| ^^^^^^ `T` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `T`
= help: consider adding a `where T: std::marker::Sync` bound
= 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 by `is_zen`
2018-12-25 16:56:47 +01:00
--> $DIR/phantom-oibit.rs:18:1
2018-08-08 14:28:26 +02:00
|
LL | fn is_zen<T: Zen>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `T` cannot be shared between threads safely
2018-12-25 16:56:47 +01:00
--> $DIR/phantom-oibit.rs:26:5
2018-08-08 14:28:26 +02:00
|
LL | is_zen(x)
| ^^^^^^ `T` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `T`
= help: consider adding a `where T: std::marker::Sync` bound
= 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>>`
note: required by `is_zen`
2018-12-25 16:56:47 +01:00
--> $DIR/phantom-oibit.rs:18:1
2018-08-08 14:28:26 +02:00
|
LL | fn is_zen<T: Zen>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.