]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/numeric-literal-cast.stderr
Rollup merge of #93487 - yerke:yerke/fix-link-toolchain-in-setup, r=Mark-Simulacrum
[rust.git] / src / test / ui / mismatched_types / numeric-literal-cast.stderr
1 error[E0308]: mismatched types
2   --> $DIR/numeric-literal-cast.rs:6:9
3    |
4 LL |     foo(1u8);
5    |         ^^^ expected `u16`, found `u8`
6    |
7 help: change the type of the numeric literal from `u8` to `u16`
8    |
9 LL |     foo(1u16);
10    |          ~~~
11
12 error[E0308]: mismatched types
13   --> $DIR/numeric-literal-cast.rs:8:10
14    |
15 LL |     foo1(2f32);
16    |          ^^^^ expected `f64`, found `f32`
17    |
18 help: change the type of the numeric literal from `f32` to `f64`
19    |
20 LL |     foo1(2f64);
21    |           ~~~
22
23 error[E0308]: mismatched types
24   --> $DIR/numeric-literal-cast.rs:10:10
25    |
26 LL |     foo2(3i16);
27    |          ^^^^ expected `i32`, found `i16`
28    |
29 help: change the type of the numeric literal from `i16` to `i32`
30    |
31 LL |     foo2(3i32);
32    |           ~~~
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0308`.