]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/large_digit_groups.rs
Merge commit 'f2cdd4a78d89c009342197cf5844a21f8aa813df' into sync_cg_clif-2022-04-22
[rust.git] / src / tools / clippy / tests / ui / large_digit_groups.rs
1 // run-rustfix
2 #![warn(clippy::large_digit_groups)]
3
4 fn main() {
5     macro_rules! mac {
6         () => {
7             0b1_10110_i64
8         };
9     }
10
11     let _good = (
12         0b1011_i64,
13         0o1_234_u32,
14         0x1_234_567,
15         1_2345_6789,
16         1234_f32,
17         1_234.12_f32,
18         1_234.123_f32,
19         1.123_4_f32,
20     );
21     let _bad = (
22         0b1_10110_i64,
23         0xd_e_adbee_f_usize,
24         1_23456_f32,
25         1_23456.12_f32,
26         1_23456.12345_f64,
27         1_23456.12345_6_f64,
28     );
29     // Ignore literals in macros
30     let _ = mac!();
31 }