summary refs log tree commit diff
path: root/src/test/ui/phantom-oibit.stderr
blob: ec8b3181bc553c668c3236ce99e04f7665eea76b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error[E0277]: `T` cannot be shared between threads safely
  --> $DIR/phantom-oibit.rs:21:5
   |
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`
  --> $DIR/phantom-oibit.rs:18:1
   |
LL | fn is_zen<T: Zen>(_: T) {}
   | ^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: `T` cannot be shared between threads safely
  --> $DIR/phantom-oibit.rs:26:5
   |
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`
  --> $DIR/phantom-oibit.rs:18:1
   |
LL | fn is_zen<T: Zen>(_: T) {}
   | ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.