1
Fork 0

Suggest the correct syntax for different struct types

This commit is contained in:
Esteban Küber 2018-01-01 15:29:50 -08:00
parent 9bab0f09d3
commit a317da42b1
6 changed files with 63 additions and 46 deletions

View file

@ -2,31 +2,25 @@ error[E0423]: expected function, found self type `Self`
--> $DIR/tuple-struct-alias.rs:16:17
|
16 | let s = Self(0, 1); //~ ERROR expected function
| ^^^^ did you mean `Self { /* fields */ }`?
| ^^^^ not a function
error[E0532]: expected tuple struct/variant, found self type `Self`
--> $DIR/tuple-struct-alias.rs:18:13
|
18 | Self(..) => {} //~ ERROR expected tuple struct/variant
| ^^^^ did you mean `Self { /* fields */ }`?
| ^^^^ not a tuple struct/variant
error[E0423]: expected function, found type alias `A`
--> $DIR/tuple-struct-alias.rs:24:13
|
24 | let s = A(0, 1); //~ ERROR expected function
| ^
| |
| did you mean `S`?
| did you mean `A { /* fields */ }`?
| ^ did you mean `S`?
error[E0532]: expected tuple struct/variant, found type alias `A`
--> $DIR/tuple-struct-alias.rs:26:9
|
26 | A(..) => {} //~ ERROR expected tuple struct/variant
| ^
| |
| did you mean `S`?
| did you mean `A { /* fields */ }`?
| ^ did you mean `S`?
error: aborting due to 4 previous errors