]> git.lizzy.rs Git - rust.git/blob - tests/ui/structs/struct-path-self.stderr
Rollup merge of #106835 - compiler-errors:new-solver-gat-rebase-oops, r=lcnr
[rust.git] / tests / ui / structs / struct-path-self.stderr
1 error[E0071]: expected struct, variant or union type, found type parameter `Self`
2   --> $DIR/struct-path-self.rs:5:17
3    |
4 LL |         let s = Self {};
5    |                 ^^^^ not a struct
6
7 error[E0109]: type arguments are not allowed on self type
8   --> $DIR/struct-path-self.rs:7:24
9    |
10 LL |         let z = Self::<u8> {};
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    |
20
21 error[E0071]: expected struct, variant or union type, found type parameter `Self`
22   --> $DIR/struct-path-self.rs:7:17
23    |
24 LL |         let z = Self::<u8> {};
25    |                 ^^^^^^^^^^ not a struct
26
27 error[E0071]: expected struct, variant or union type, found type parameter `Self`
28   --> $DIR/struct-path-self.rs:11:13
29    |
30 LL |             Self { .. } => {}
31    |             ^^^^ not a struct
32
33 error[E0109]: type arguments are not allowed on self type
34   --> $DIR/struct-path-self.rs:20:24
35    |
36 LL |         let z = Self::<u8> {};
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    |
54
55 error[E0109]: type arguments are not allowed on self type
56   --> $DIR/struct-path-self.rs:30:24
57    |
58 LL |         let z = Self::<u8> {};
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    |
76
77 error: aborting due to 6 previous errors
78
79 Some errors have detailed explanations: E0071, E0109.
80 For more information about an error, try `rustc --explain E0071`.