rust/tests/ui/suggestions/recover-invalid-float.rs
2023-01-11 09:32:08 +00:00

11 lines
268 B
Rust

// run-rustfix
fn main() {
let _: f32 = .3;
//~^ ERROR float literals must have an integer part
let _: f32 = .42f32;
//~^ ERROR float literals must have an integer part
let _: f64 = .5f64;
//~^ ERROR float literals must have an integer part
}