1 error[E0277]: `T` cannot be shared between threads safely
2 --> $DIR/phantom-auto-trait.rs:21:12
5 | ------ ^ `T` cannot be shared between threads safely
7 | required by a bound introduced by this call
9 note: required for `&T` to implement `Zen`
10 --> $DIR/phantom-auto-trait.rs:10:24
12 LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
14 = note: required because it appears within the type `PhantomData<&T>`
15 note: required because it appears within the type `Guard<'_, T>`
16 --> $DIR/phantom-auto-trait.rs:12:8
18 LL | struct Guard<'a, T: 'a> {
20 note: required by a bound in `is_zen`
21 --> $DIR/phantom-auto-trait.rs:18:14
23 LL | fn is_zen<T: Zen>(_: T) {}
24 | ^^^ required by this bound in `is_zen`
25 help: consider restricting type parameter `T`
27 LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
30 error[E0277]: `T` cannot be shared between threads safely
31 --> $DIR/phantom-auto-trait.rs:26:12
34 | ------ ^ `T` cannot be shared between threads safely
36 | required by a bound introduced by this call
38 note: required for `&T` to implement `Zen`
39 --> $DIR/phantom-auto-trait.rs:10:24
41 LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
43 = note: required because it appears within the type `PhantomData<&T>`
44 note: required because it appears within the type `Guard<'_, T>`
45 --> $DIR/phantom-auto-trait.rs:12:8
47 LL | struct Guard<'a, T: 'a> {
49 note: required because it appears within the type `Nested<Guard<'_, T>>`
50 --> $DIR/phantom-auto-trait.rs:16:8
52 LL | struct Nested<T>(T);
54 note: required by a bound in `is_zen`
55 --> $DIR/phantom-auto-trait.rs:18:14
57 LL | fn is_zen<T: Zen>(_: T) {}
58 | ^^^ required by this bound in `is_zen`
59 help: consider restricting type parameter `T`
61 LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
64 error: aborting due to 2 previous errors
66 For more information about this error, try `rustc --explain E0277`.