]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: `T` cannot be shared between threads safely |
e1599b0c | 2 | --> $DIR/phantom-oibit.rs:21:12 |
b7449926 | 3 | | |
e1599b0c | 4 | LL | fn is_zen<T: Zen>(_: T) {} |
ba9703b0 | 5 | | --- required by this bound in `is_zen` |
74b04a01 | 6 | ... |
b7449926 | 7 | LL | is_zen(x) |
e1599b0c | 8 | | ^ `T` cannot be shared between threads safely |
b7449926 | 9 | | |
b7449926 | 10 | = note: required because of the requirements on the impl of `Zen` for `&T` |
1b1a35ee | 11 | = note: required because it appears within the type `PhantomData<&T>` |
b7449926 | 12 | = note: required because it appears within the type `Guard<'_, T>` |
ba9703b0 XL |
13 | help: consider restricting type parameter `T` |
14 | | | |
1b1a35ee XL |
15 | LL | fn not_sync<T: Sync>(x: Guard<T>) { |
16 | | ^^^^^^ | |
b7449926 XL |
17 | |
18 | error[E0277]: `T` cannot be shared between threads safely | |
e1599b0c | 19 | --> $DIR/phantom-oibit.rs:26:12 |
b7449926 | 20 | | |
e1599b0c | 21 | LL | fn is_zen<T: Zen>(_: T) {} |
ba9703b0 | 22 | | --- required by this bound in `is_zen` |
e1599b0c | 23 | ... |
b7449926 | 24 | LL | is_zen(x) |
e1599b0c | 25 | | ^ `T` cannot be shared between threads safely |
b7449926 | 26 | | |
b7449926 | 27 | = note: required because of the requirements on the impl of `Zen` for `&T` |
1b1a35ee | 28 | = note: required because it appears within the type `PhantomData<&T>` |
b7449926 XL |
29 | = note: required because it appears within the type `Guard<'_, T>` |
30 | = note: required because it appears within the type `Nested<Guard<'_, T>>` | |
ba9703b0 XL |
31 | help: consider restricting type parameter `T` |
32 | | | |
1b1a35ee XL |
33 | LL | fn nested_not_sync<T: Sync>(x: Nested<Guard<T>>) { |
34 | | ^^^^^^ | |
b7449926 XL |
35 | |
36 | error: aborting due to 2 previous errors | |
37 | ||
38 | For more information about this error, try `rustc --explain E0277`. |