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