|
1 |
| -error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:17>` |
| 1 | +error: `Self` is not valid in the self type of an impl block |
2 | 2 | --> $DIR/resolve-self-in-impl.rs:14:13
|
3 | 3 | |
|
4 | 4 | LL | impl Tr for Self {}
|
5 | 5 | | ^^^^
|
6 | 6 | |
|
7 |
| - = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:17>` again |
8 |
| -note: cycle used when collecting item types in top-level module |
9 |
| - --> $DIR/resolve-self-in-impl.rs:1:1 |
10 |
| - | |
11 |
| -LL | / #![feature(associated_type_defaults)] |
12 |
| -LL | | |
13 |
| -LL | | struct S<T = u8>(T); |
14 |
| -LL | | trait Tr<T = u8> { |
15 |
| -... | |
16 |
| -LL | | |
17 |
| -LL | | fn main() {} |
18 |
| - | |____________^ |
| 7 | + = note: replace `Self` with a different type |
19 | 8 |
|
20 |
| -error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:20>` |
| 9 | +error: `Self` is not valid in the self type of an impl block |
21 | 10 | --> $DIR/resolve-self-in-impl.rs:15:15
|
22 | 11 | |
|
23 | 12 | LL | impl Tr for S<Self> {}
|
24 | 13 | | ^^^^
|
25 | 14 | |
|
26 |
| - = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:20>` again |
27 |
| -note: cycle used when collecting item types in top-level module |
28 |
| - --> $DIR/resolve-self-in-impl.rs:1:1 |
29 |
| - | |
30 |
| -LL | / #![feature(associated_type_defaults)] |
31 |
| -LL | | |
32 |
| -LL | | struct S<T = u8>(T); |
33 |
| -LL | | trait Tr<T = u8> { |
34 |
| -... | |
35 |
| -LL | | |
36 |
| -LL | | fn main() {} |
37 |
| - | |____________^ |
| 15 | + = note: replace `Self` with a different type |
38 | 16 |
|
39 |
| -error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:10>` |
| 17 | +error: `Self` is not valid in the self type of an impl block |
40 | 18 | --> $DIR/resolve-self-in-impl.rs:16:6
|
41 | 19 | |
|
42 | 20 | LL | impl Self {}
|
43 | 21 | | ^^^^
|
44 | 22 | |
|
45 |
| - = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:10>` again |
46 |
| -note: cycle used when collecting item types in top-level module |
47 |
| - --> $DIR/resolve-self-in-impl.rs:1:1 |
48 |
| - | |
49 |
| -LL | / #![feature(associated_type_defaults)] |
50 |
| -LL | | |
51 |
| -LL | | struct S<T = u8>(T); |
52 |
| -LL | | trait Tr<T = u8> { |
53 |
| -... | |
54 |
| -LL | | |
55 |
| -LL | | fn main() {} |
56 |
| - | |____________^ |
| 23 | + = note: replace `Self` with a different type |
57 | 24 |
|
58 |
| -error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:13>` |
| 25 | +error: `Self` is not valid in the self type of an impl block |
59 | 26 | --> $DIR/resolve-self-in-impl.rs:17:8
|
60 | 27 | |
|
61 | 28 | LL | impl S<Self> {}
|
62 | 29 | | ^^^^
|
63 | 30 | |
|
64 |
| - = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:13>` again |
65 |
| -note: cycle used when collecting item types in top-level module |
66 |
| - --> $DIR/resolve-self-in-impl.rs:1:1 |
| 31 | + = note: replace `Self` with a different type |
| 32 | + |
| 33 | +error: `Self` is not valid in the self type of an impl block |
| 34 | + --> $DIR/resolve-self-in-impl.rs:18:7 |
67 | 35 | |
|
68 |
| -LL | / #![feature(associated_type_defaults)] |
69 |
| -LL | | |
70 |
| -LL | | struct S<T = u8>(T); |
71 |
| -LL | | trait Tr<T = u8> { |
72 |
| -... | |
73 |
| -LL | | |
74 |
| -LL | | fn main() {} |
75 |
| - | |____________^ |
| 36 | +LL | impl (Self, Self) {} |
| 37 | + | ^^^^ ^^^^ |
| 38 | + | |
| 39 | + = note: replace `Self` with a different type |
76 | 40 |
|
77 |
| -error[E0391]: cycle detected when computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:23>` |
78 |
| - --> $DIR/resolve-self-in-impl.rs:18:1 |
| 41 | +error[E0391]: cycle detected when computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:19:1: 19:23>` |
| 42 | + --> $DIR/resolve-self-in-impl.rs:19:1 |
79 | 43 | |
|
80 | 44 | LL | impl Tr<Self::A> for S {}
|
81 | 45 | | ^^^^^^^^^^^^^^^^^^^^^^
|
82 | 46 | |
|
83 |
| - = note: ...which immediately requires computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:23>` again |
| 47 | + = note: ...which immediately requires computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:19:1: 19:23>` again |
84 | 48 | note: cycle used when collecting item types in top-level module
|
85 | 49 | --> $DIR/resolve-self-in-impl.rs:1:1
|
86 | 50 | |
|
|
93 | 57 | LL | | fn main() {}
|
94 | 58 | | |____________^
|
95 | 59 |
|
96 |
| -error: aborting due to 5 previous errors |
| 60 | +error: aborting due to 6 previous errors |
97 | 61 |
|
98 | 62 | For more information about this error, try `rustc --explain E0391`.
|
0 commit comments