]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | error[E0071]: expected struct, variant or union type, found type parameter `Self` |
0731742a | 2 | --> $DIR/struct-path-self.rs:5:17 |
b7449926 XL |
3 | | |
4 | LL | let s = Self {}; | |
5 | | ^^^^ not a struct | |
6 | ||
923072b8 | 7 | error[E0109]: type arguments are not allowed on self type |
0731742a | 8 | --> $DIR/struct-path-self.rs:7:24 |
b7449926 XL |
9 | | |
10 | LL | let z = Self::<u8> {}; | |
923072b8 FG |
11 | | ---- ^^ type argument not allowed |
12 | | | | |
13 | | not allowed on self type | |
14 | | | |
15 | help: the `Self` type doesn't accept type parameters | |
16 | | | |
17 | LL - let z = Self::<u8> {}; | |
18 | LL + let z = Self {}; | |
19 | | | |
b7449926 | 20 | |
60c5eb7d | 21 | error[E0071]: expected struct, variant or union type, found type parameter `Self` |
0731742a | 22 | --> $DIR/struct-path-self.rs:7:17 |
b7449926 XL |
23 | | |
24 | LL | let z = Self::<u8> {}; | |
25 | | ^^^^^^^^^^ not a struct | |
26 | ||
60c5eb7d | 27 | error[E0071]: expected struct, variant or union type, found type parameter `Self` |
0731742a | 28 | --> $DIR/struct-path-self.rs:11:13 |
b7449926 XL |
29 | | |
30 | LL | Self { .. } => {} | |
31 | | ^^^^ not a struct | |
32 | ||
923072b8 | 33 | error[E0109]: type arguments are not allowed on self type |
0731742a | 34 | --> $DIR/struct-path-self.rs:20:24 |
b7449926 | 35 | | |
532ac7d7 | 36 | LL | let z = Self::<u8> {}; |
923072b8 FG |
37 | | ---- ^^ type argument not allowed |
38 | | | | |
39 | | not allowed on self type | |
40 | | | |
41 | note: `Self` is of type `S` | |
42 | --> $DIR/struct-path-self.rs:1:8 | |
43 | | | |
44 | LL | struct S; | |
45 | | ^ `Self` corresponds to this type, which doesn't have generic parameters | |
46 | ... | |
47 | LL | impl Tr for S { | |
48 | | ------------- `Self` is on type `S` in this `impl` | |
49 | help: the `Self` type doesn't accept type parameters | |
50 | | | |
51 | LL - let z = Self::<u8> {}; | |
52 | LL + let z = Self {}; | |
53 | | | |
b7449926 | 54 | |
923072b8 | 55 | error[E0109]: type arguments are not allowed on self type |
0731742a | 56 | --> $DIR/struct-path-self.rs:30:24 |
b7449926 | 57 | | |
532ac7d7 | 58 | LL | let z = Self::<u8> {}; |
923072b8 FG |
59 | | ---- ^^ type argument not allowed |
60 | | | | |
61 | | not allowed on self type | |
62 | | | |
63 | note: `Self` is of type `S` | |
64 | --> $DIR/struct-path-self.rs:1:8 | |
65 | | | |
66 | LL | struct S; | |
67 | | ^ `Self` corresponds to this type, which doesn't have generic parameters | |
68 | ... | |
69 | LL | impl S { | |
70 | | ------ `Self` is on type `S` in this `impl` | |
71 | help: the `Self` type doesn't accept type parameters | |
72 | | | |
73 | LL - let z = Self::<u8> {}; | |
74 | LL + let z = Self {}; | |
75 | | | |
b7449926 XL |
76 | |
77 | error: aborting due to 6 previous errors | |
78 | ||
48663c56 | 79 | Some errors have detailed explanations: E0071, E0109. |
b7449926 | 80 | For more information about an error, try `rustc --explain E0071`. |