]> git.lizzy.rs Git - rust.git/blob - src/test/ui/phantom-oibit.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / phantom-oibit.stderr
1 error[E0277]: `T` cannot be shared between threads safely
2   --> $DIR/phantom-oibit.rs:21:5
3    |
4 LL |     is_zen(x)
5    |     ^^^^^^ `T` cannot be shared between threads safely
6    |
7    = help: the trait `std::marker::Sync` is not implemented for `T`
8    = help: consider adding a `where T: std::marker::Sync` bound
9    = note: required because of the requirements on the impl of `Zen` for `&T`
10    = note: required because it appears within the type `std::marker::PhantomData<&T>`
11    = note: required because it appears within the type `Guard<'_, T>`
12 note: required by `is_zen`
13   --> $DIR/phantom-oibit.rs:18:1
14    |
15 LL | fn is_zen<T: Zen>(_: T) {}
16    | ^^^^^^^^^^^^^^^^^^^^^^^
17
18 error[E0277]: `T` cannot be shared between threads safely
19   --> $DIR/phantom-oibit.rs:26:5
20    |
21 LL |     is_zen(x)
22    |     ^^^^^^ `T` cannot be shared between threads safely
23    |
24    = help: the trait `std::marker::Sync` is not implemented for `T`
25    = help: consider adding a `where T: std::marker::Sync` bound
26    = note: required because of the requirements on the impl of `Zen` for `&T`
27    = note: required because it appears within the type `std::marker::PhantomData<&T>`
28    = note: required because it appears within the type `Guard<'_, T>`
29    = note: required because it appears within the type `Nested<Guard<'_, T>>`
30 note: required by `is_zen`
31   --> $DIR/phantom-oibit.rs:18:1
32    |
33 LL | fn is_zen<T: Zen>(_: T) {}
34    | ^^^^^^^^^^^^^^^^^^^^^^^
35
36 error: aborting due to 2 previous errors
37
38 For more information about this error, try `rustc --explain E0277`.