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