Andrew Walbran | d1b91c7 | 2020-08-11 17:12:08 +0100 | [diff] [blame] | 1 | error[E0423]: expected value, found struct `S` |
| 2 | --> $DIR/self-span.rs:18:23 |
| 3 | | |
| 4 | 3 | pub struct S {} |
| 5 | | --------------- `S` defined here |
| 6 | ... |
| 7 | 18 | let _: Self = Self; |
Haibo Huang | d8abf3d | 2020-08-17 15:39:53 -0700 | [diff] [blame^] | 8 | | ^^^^ help: use struct literal syntax instead: `S {}` |
Andrew Walbran | d1b91c7 | 2020-08-11 17:12:08 +0100 | [diff] [blame] | 9 | |
| 10 | error[E0308]: mismatched types |
| 11 | --> $DIR/self-span.rs:17:21 |
| 12 | | |
| 13 | 17 | let _: () = self; |
| 14 | | -- ^^^^ expected `()`, found struct `S` |
| 15 | | | |
| 16 | | expected due to this |
| 17 | |
| 18 | error[E0308]: mismatched types |
| 19 | --> $DIR/self-span.rs:25:21 |
| 20 | | |
| 21 | 25 | let _: () = self; |
| 22 | | -- ^^^^ expected `()`, found enum `E` |
| 23 | | | |
| 24 | | expected due to this |
| 25 | |
| 26 | error[E0533]: expected unit struct, unit variant or constant, found struct variant `Self::V` |
| 27 | --> $DIR/self-span.rs:26:23 |
| 28 | | |
| 29 | 26 | let _: Self = Self::V; |
| 30 | | ^^^^^^^ |