Files
rust/compiler
Jonathan Brouwer e938cd8409 Rollup merge of #156827 - SpecificProtagonist:float_literal_f32_fallback-suggestion, r=Kivooeo
float_literal_f32_fallback: Don't suggest invalid code

When a float literal ended with a dot, `float_literal_f32_fallback` should not include it in its suggestion, as that would result in invalid syntax ([playgound](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=de47274bf2b07070b79a97ce6744ffcbO)):

```
2 |     let _: f32 = From::from(0.);
  |                             ^^ help: explicitly specify the type as `f32`: `0._f32`
```

Relevant tracking issue: rust-lang/rust#154024
2026-05-24 08:27:20 +02:00
..