rust/tests/ui/cast/cast_lit_suffix-issue-13839...

32 lines
848 B
Plaintext

error[E0308]: mismatched types
--> $DIR/cast_lit_suffix-issue-138392.rs:4:18
|
LL | let _x: u8 = (4i32);
| -- ^^^^^^ expected `u8`, found `i32`
| |
| expected due to this
|
help: change the type of the numeric literal from `i32` to `u8`
|
LL - let _x: u8 = (4i32);
LL + let _x: u8 = (4u8);
|
error[E0308]: mismatched types
--> $DIR/cast_lit_suffix-issue-138392.rs:5:18
|
LL | let _y: u8 = (4.0f32);
| -- ^^^^^^^^ expected `u8`, found `f32`
| |
| expected due to this
|
help: change the type of the numeric literal from `f32` to `u8`
|
LL - let _y: u8 = (4.0f32);
LL + let _y: u8 = (4u8);
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.