43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
|
error: float literals must have an integer part
|
||
|
--> $DIR/recover-invalid-float.rs:2:20
|
||
|
|
|
||
|
LL | let _: usize = .3;
|
||
|
| ^^ help: must have an integer part: `0.3`
|
||
|
|
||
|
error: float literals must have an integer part
|
||
|
--> $DIR/recover-invalid-float.rs:5:20
|
||
|
|
|
||
|
LL | let _: usize = .42f32;
|
||
|
| ^^^^^^ help: must have an integer part: `0.42f32`
|
||
|
|
||
|
error: float literals must have an integer part
|
||
|
--> $DIR/recover-invalid-float.rs:8:20
|
||
|
|
|
||
|
LL | let _: usize = .5f64;
|
||
|
| ^^^^^ help: must have an integer part: `0.5f64`
|
||
|
|
||
|
error[E0308]: mismatched types
|
||
|
--> $DIR/recover-invalid-float.rs:2:20
|
||
|
|
|
||
|
LL | let _: usize = .3;
|
||
|
| ^^ expected usize, found floating-point number
|
||
|
|
|
||
|
= note: expected type `usize`
|
||
|
found type `{float}`
|
||
|
|
||
|
error[E0308]: mismatched types
|
||
|
--> $DIR/recover-invalid-float.rs:5:20
|
||
|
|
|
||
|
LL | let _: usize = .42f32;
|
||
|
| ^^^^^^ expected usize, found f32
|
||
|
|
||
|
error[E0308]: mismatched types
|
||
|
--> $DIR/recover-invalid-float.rs:8:20
|
||
|
|
|
||
|
LL | let _: usize = .5f64;
|
||
|
| ^^^^^ expected usize, found f64
|
||
|
|
||
|
error: aborting due to 6 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0308`.
|