11error[E0277]: `T` cannot be shared between threads safely
2-   --> $DIR/phantom- auto-trait.rs:21 :12
2+   --> $DIR/auto-trait-phantom-data-bounds .rs:20 :12
33   |
44LL |     is_zen(x)
55   |     ------ ^ `T` cannot be shared between threads safely
66   |     |
77   |     required by a bound introduced by this call
88   |
99note: required for `&T` to implement `Zen`
10-   --> $DIR/phantom- auto-trait.rs:10 :24
10+   --> $DIR/auto-trait-phantom-data-bounds .rs:9 :24
1111   |
1212LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
1313   |                        ^^^     ^^^^^          ---- unsatisfied trait bound introduced here
1414note: required because it appears within the type `PhantomData<&T>`
1515  --> $SRC_DIR/core/src/marker.rs:LL:COL
1616note: required because it appears within the type `Guard<'_, T>`
17-   --> $DIR/phantom- auto-trait.rs:12 :8
17+   --> $DIR/auto-trait-phantom-data-bounds .rs:11 :8
1818   |
1919LL | struct Guard<'a, T: 'a> {
2020   |        ^^^^^
2121note: required by a bound in `is_zen`
22-   --> $DIR/phantom- auto-trait.rs:18 :14
22+   --> $DIR/auto-trait-phantom-data-bounds .rs:17 :14
2323   |
2424LL | fn is_zen<T: Zen>(_: T) {}
2525   |              ^^^ required by this bound in `is_zen`
@@ -29,32 +29,32 @@ LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
2929   |              +++++++++++++++++++
3030
3131error[E0277]: `T` cannot be shared between threads safely
32-   --> $DIR/phantom- auto-trait.rs:26 :12
32+   --> $DIR/auto-trait-phantom-data-bounds .rs:25 :12
3333   |
3434LL |     is_zen(x)
3535   |     ------ ^ `T` cannot be shared between threads safely
3636   |     |
3737   |     required by a bound introduced by this call
3838   |
3939note: required for `&T` to implement `Zen`
40-   --> $DIR/phantom- auto-trait.rs:10 :24
40+   --> $DIR/auto-trait-phantom-data-bounds .rs:9 :24
4141   |
4242LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
4343   |                        ^^^     ^^^^^          ---- unsatisfied trait bound introduced here
4444note: required because it appears within the type `PhantomData<&T>`
4545  --> $SRC_DIR/core/src/marker.rs:LL:COL
4646note: required because it appears within the type `Guard<'_, T>`
47-   --> $DIR/phantom- auto-trait.rs:12 :8
47+   --> $DIR/auto-trait-phantom-data-bounds .rs:11 :8
4848   |
4949LL | struct Guard<'a, T: 'a> {
5050   |        ^^^^^
5151note: required because it appears within the type `Nested<Guard<'_, T>>`
52-   --> $DIR/phantom- auto-trait.rs:16 :8
52+   --> $DIR/auto-trait-phantom-data-bounds .rs:15 :8
5353   |
5454LL | struct Nested<T>(T);
5555   |        ^^^^^^
5656note: required by a bound in `is_zen`
57-   --> $DIR/phantom- auto-trait.rs:18 :14
57+   --> $DIR/auto-trait-phantom-data-bounds .rs:17 :14
5858   |
5959LL | fn is_zen<T: Zen>(_: T) {}
6060   |              ^^^ required by this bound in `is_zen`
0 commit comments