blob: 2690791ad34dd992ac30801b1137b2d13219ed6a [file] [log] [blame]
Andrew Walbrand1b91c72020-08-11 17:12:08 +01001error[E0308]: mismatched types
David LeGareffb07e72022-03-01 18:48:27 +00002 --> tests/ui/self-span.rs:17:21
Andrew Walbrand1b91c72020-08-11 17:12:08 +01003 |
417 | let _: () = self;
5 | -- ^^^^ expected `()`, found struct `S`
6 | |
7 | expected due to this
8
Joel Galenson5448f372021-04-01 15:10:30 -07009error: the `Self` constructor can only be used with tuple or unit structs
David LeGareffb07e72022-03-01 18:48:27 +000010 --> tests/ui/self-span.rs:18:23
Joel Galenson5448f372021-04-01 15:10:30 -070011 |
1218 | let _: Self = Self;
13 | ^^^^ help: use curly brackets: `Self { /* fields */ }`
14
Andrew Walbrand1b91c72020-08-11 17:12:08 +010015error[E0308]: mismatched types
David LeGareffb07e72022-03-01 18:48:27 +000016 --> tests/ui/self-span.rs:25:21
Andrew Walbrand1b91c72020-08-11 17:12:08 +010017 |
1825 | let _: () = self;
19 | -- ^^^^ expected `()`, found enum `E`
20 | |
21 | expected due to this
22
23error[E0533]: expected unit struct, unit variant or constant, found struct variant `Self::V`
David LeGareffb07e72022-03-01 18:48:27 +000024 --> tests/ui/self-span.rs:26:23
Andrew Walbrand1b91c72020-08-11 17:12:08 +010025 |
2626 | let _: Self = Self::V;
27 | ^^^^^^^