]> git.lizzy.rs Git - rust.git/blob - tests/ui/unreadable_literal.rs
Stabilize tool lints
[rust.git] / tests / ui / unreadable_literal.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
11
12
13 #[warn(clippy::unreadable_literal)]
14 #[allow(unused_variables)]
15 fn main() {
16     let good = (0b1011_i64, 0o1_234_u32, 0x1_234_567, 65536, 1_2345_6789, 1234_f32, 1_234.12_f32, 1_234.123_f32, 1.123_4_f32);
17     let bad = (0b110110_i64, 0x12345678901_usize, 123456_f32, 1.234567_f32);
18     let good_sci = 1.1234e1;
19     let bad_sci = 1.123456e1;
20 }