]> git.lizzy.rs Git - rust.git/blob - tests/ui/large_digit_groups.rs
Auto merge of #4840 - flip1995:rollup-jqk3a3i, r=flip1995
[rust.git] / tests / ui / large_digit_groups.rs
1 // run-rustfix
2 #[warn(clippy::large_digit_groups)]
3 #[allow(unused_variables)]
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         0x1_23456_78901_usize,
24         1_23456_f32,
25         1_23456.12_f32,
26         1_23456.12345_f64,
27         1_23456.12345_6_f64,
28     );
29
30     // Ignore literals in macros
31     let _ = mac!();
32 }