]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/recover-invalid-float-invalid.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / ui / suggestions / recover-invalid-float-invalid.rs
1 // Check that suggestions to add a zero to integers with a preceding dot only appear when the change
2 // will result in a valid floating point literal.
3
4 fn main() {}
5
6 fn a() {
7     _ = .3u32;
8     //~^ ERROR expected expression, found `.`
9 }
10
11 fn b() {
12     _ = .0b0;
13     //~^ ERROR expected expression, found `.`
14 }
15
16 fn c() {
17     _ = .0o07;
18     //~^ ERROR expected expression, found `.`
19 }
20
21 fn d() {
22     _ = .0x0ABC;
23     //~^ ERROR expected expression, found `.`
24 }