1
1
error[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
3
3
|
4
4
LL | is_zen(x)
5
5
| ------ ^ `T` cannot be shared between threads safely
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
9
note: required for `&T` to implement `Zen`
10
- --> $DIR/phantom- auto-trait.rs:10 :24
10
+ --> $DIR/auto-trait-phantom-data-bounds .rs:9 :24
11
11
|
12
12
LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
13
13
| ^^^ ^^^^^ ---- unsatisfied trait bound introduced here
14
14
note: required because it appears within the type `PhantomData<&T>`
15
15
--> $SRC_DIR/core/src/marker.rs:LL:COL
16
16
note: 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
18
18
|
19
19
LL | struct Guard<'a, T: 'a> {
20
20
| ^^^^^
21
21
note: 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
23
23
|
24
24
LL | fn is_zen<T: Zen>(_: T) {}
25
25
| ^^^ required by this bound in `is_zen`
@@ -29,32 +29,32 @@ LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
29
29
| +++++++++++++++++++
30
30
31
31
error[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
33
33
|
34
34
LL | is_zen(x)
35
35
| ------ ^ `T` cannot be shared between threads safely
36
36
| |
37
37
| required by a bound introduced by this call
38
38
|
39
39
note: required for `&T` to implement `Zen`
40
- --> $DIR/phantom- auto-trait.rs:10 :24
40
+ --> $DIR/auto-trait-phantom-data-bounds .rs:9 :24
41
41
|
42
42
LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
43
43
| ^^^ ^^^^^ ---- unsatisfied trait bound introduced here
44
44
note: required because it appears within the type `PhantomData<&T>`
45
45
--> $SRC_DIR/core/src/marker.rs:LL:COL
46
46
note: 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
48
48
|
49
49
LL | struct Guard<'a, T: 'a> {
50
50
| ^^^^^
51
51
note: 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
53
53
|
54
54
LL | struct Nested<T>(T);
55
55
| ^^^^^^
56
56
note: 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
58
58
|
59
59
LL | fn is_zen<T: Zen>(_: T) {}
60
60
| ^^^ required by this bound in `is_zen`
0 commit comments