rust/tests/ui/suggestions/recover-invalid-float.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
268 B
Rust
Raw Normal View History

2019-04-21 22:44:23 +00:00
// run-rustfix
fn main() {
2019-04-21 22:44:23 +00:00
let _: f32 = .3;
//~^ ERROR float literals must have an integer part
2019-04-21 22:44:23 +00:00
let _: f32 = .42f32;
//~^ ERROR float literals must have an integer part
2019-04-21 22:44:23 +00:00
let _: f64 = .5f64;
//~^ ERROR float literals must have an integer part
}