fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.4 KiB34 linesraw
1error[E0277]: `T` cannot be shared between threads safely
2  --> $DIR/phantom-oibit.rs:21:12
3   |
4LL | fn is_zen<T: Zen>(_: T) {}
5   |    ------    --- required by this bound in `is_zen`
6...
7LL |     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 adding a `where T: std::marker::Sync` bound
12   = note: required because of the requirements on the impl of `Zen` for `&T`
13   = note: required because it appears within the type `std::marker::PhantomData<&T>`
14   = note: required because it appears within the type `Guard<'_, T>`
15
16error[E0277]: `T` cannot be shared between threads safely
17  --> $DIR/phantom-oibit.rs:26:12
18   |
19LL | fn is_zen<T: Zen>(_: T) {}
20   |    ------    --- required by this bound in `is_zen`
21...
22LL |     is_zen(x)
23   |            ^ `T` cannot be shared between threads safely
24   |
25   = help: the trait `std::marker::Sync` is not implemented for `T`
26   = help: consider adding a `where T: std::marker::Sync` bound
27   = note: required because of the requirements on the impl of `Zen` for `&T`
28   = note: required because it appears within the type `std::marker::PhantomData<&T>`
29   = note: required because it appears within the type `Guard<'_, T>`
30   = note: required because it appears within the type `Nested<Guard<'_, T>>`
31
32error: aborting due to 2 previous errors
33
34For more information about this error, try `rustc --explain E0277`.