]> git.lizzy.rs Git - rust.git/blob - tests/ui/large_digit_groups.rs
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / large_digit_groups.rs
1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 #[warn(clippy::large_digit_groups)]
11 #[allow(unused_variables)]
12 fn main() {
13     let good = (
14         0b1011_i64,
15         0o1_234_u32,
16         0x1_234_567,
17         1_2345_6789,
18         1234_f32,
19         1_234.12_f32,
20         1_234.123_f32,
21         1.123_4_f32,
22     );
23     let bad = (
24         0b1_10110_i64,
25         0x1_23456_78901_usize,
26         1_23456_f32,
27         1_23456.12_f32,
28         1_23456.12345_f32,
29         1_23456.12345_6_f32,
30     );
31 }