]> git.proxmox.com Git - rustc.git/blame - src/test/ui/typeof/type_mismatch.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / typeof / type_mismatch.stderr
CommitLineData
cdc7bbd5
XL
1error[E0516]: `typeof` is a reserved keyword but unimplemented
2 --> $DIR/type_mismatch.rs:5:12
3 |
4LL | let b: typeof(a) = 1i8;
5 | ^^^^^^^^^ reserved keyword
04454e1e
FG
6 |
7help: consider replacing `typeof(...)` with an actual type
8 |
9LL | let b: u8 = 1i8;
10 | ~~
cdc7bbd5
XL
11
12error[E0308]: mismatched types
13 --> $DIR/type_mismatch.rs:5:24
14 |
15LL | let b: typeof(a) = 1i8;
16 | --------- ^^^ expected `u8`, found `i8`
17 | |
18 | expected due to this
19 |
20help: change the type of the numeric literal from `i8` to `u8`
21 |
22LL | let b: typeof(a) = 1u8;
c295e0f8 23 | ~~
cdc7bbd5
XL
24
25error: aborting due to 2 previous errors
26
27Some errors have detailed explanations: E0308, E0516.
28For more information about an error, try `rustc --explain E0308`.