]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/resolve-self-in-impl.stderr
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / ui / resolve / resolve-self-in-impl.stderr
1 error: `Self` is not valid in the self type of an impl block
2   --> $DIR/resolve-self-in-impl.rs:16:6
3    |
4 LL | impl Self {}
5    |      ^^^^
6    |
7    = note: replace `Self` with a different type
8
9 error: `Self` is not valid in the self type of an impl block
10   --> $DIR/resolve-self-in-impl.rs:17:8
11    |
12 LL | impl S<Self> {}
13    |        ^^^^
14    |
15    = note: replace `Self` with a different type
16
17 error: `Self` is not valid in the self type of an impl block
18   --> $DIR/resolve-self-in-impl.rs:18:7
19    |
20 LL | impl (Self, Self) {}
21    |       ^^^^  ^^^^
22    |
23    = note: replace `Self` with a different type
24
25 error: `Self` is not valid in the self type of an impl block
26   --> $DIR/resolve-self-in-impl.rs:14:13
27    |
28 LL | impl Tr for Self {}
29    |             ^^^^
30    |
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:15:15
35    |
36 LL | impl Tr for S<Self> {}
37    |               ^^^^
38    |
39    = note: replace `Self` with a different type
40
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
43    |
44 LL | impl Tr<Self::A> for S {}
45    | ^^^^^^^^^^^^^^^^^^^^^^
46    |
47    = note: ...which immediately requires computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:19:1: 19:23>` again
48 note: cycle used when collecting item types in top-level module
49   --> $DIR/resolve-self-in-impl.rs:1:1
50    |
51 LL | / #![feature(associated_type_defaults)]
52 LL | |
53 LL | | struct S<T = u8>(T);
54 LL | | trait Tr<T = u8> {
55 ...  |
56 LL | |
57 LL | | fn main() {}
58    | |____________^
59
60 error: aborting due to 6 previous errors
61
62 For more information about this error, try `rustc --explain E0391`.