]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/tuple-struct-alias.stderr
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / ui / resolve / tuple-struct-alias.stderr
1 error[E0532]: expected tuple struct or tuple variant, found type alias `A`
2   --> $DIR/tuple-struct-alias.rs:7:9
3    |
4 LL | struct S(u8, u16);
5    | ------------------ similarly named tuple struct `S` defined here
6 ...
7 LL |         A(..) => {}
8    |         ^ help: a tuple struct with a similar name exists: `S`
9    |
10    = note: can't use a type alias as a constructor
11
12 error[E0423]: expected function, tuple struct or tuple variant, found type alias `A`
13   --> $DIR/tuple-struct-alias.rs:5:13
14    |
15 LL | struct S(u8, u16);
16    | ------------------ similarly named tuple struct `S` defined here
17 ...
18 LL |     let s = A(0, 1);
19    |             ^ help: a tuple struct with a similar name exists: `S`
20    |
21    = note: can't use a type alias as a constructor
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0423, E0532.
26 For more information about an error, try `rustc --explain E0423`.