]> git.lizzy.rs Git - rust.git/blob - tests/ui/unreadable_literal.fixed
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / unreadable_literal.fixed
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 // run-rustfix
11
12 #[warn(clippy::unreadable_literal)]
13 #[allow(unused_variables)]
14 fn main() {
15     let good = (
16         0b1011_i64,
17         0o1_234_u32,
18         0x1_234_567,
19         65536,
20         1_2345_6789,
21         1234_f32,
22         1_234.12_f32,
23         1_234.123_f32,
24         1.123_4_f32,
25     );
26     let bad = (0b11_0110_i64, 0x0123_4567_8901_usize, 123_456_f32, 1.234_567_f32);
27     let good_sci = 1.1234e1;
28     let bad_sci = 1.123_456e1;
29 }