]> git.lizzy.rs Git - rust.git/blob - src/test/parse-fail/lex-bad-numeric-literals.rs
Auto merge of #22541 - Manishearth:rollup, r=Gankro
[rust.git] / src / test / parse-fail / lex-bad-numeric-literals.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 fn main() {
12     0o1.0; //~ ERROR: octal float literal is not supported
13     0o2f32; //~ ERROR: octal float literal is not supported
14     0o3.0f32; //~ ERROR: octal float literal is not supported
15     0o4e4; //~ ERROR: octal float literal is not supported
16     0o5.0e5; //~ ERROR: octal float literal is not supported
17     0o6e6f32; //~ ERROR: octal float literal is not supported
18     0o7.0e7f64; //~ ERROR: octal float literal is not supported
19     0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported
20     0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported
21     0o; //~ ERROR: no valid digits
22     1e+; //~ ERROR: expected at least one digit in exponent
23     0x539.0; //~ ERROR: hexadecimal float literal is not supported
24     99999999999999999999999999999999; //~ ERROR: int literal is too large
25     99999999999999999999999999999999u32; //~ ERROR: int literal is too large
26     0x; //~ ERROR: no valid digits
27     0xu32; //~ ERROR: no valid digits
28     0ou32; //~ ERROR: no valid digits
29     0bu32; //~ ERROR: no valid digits
30     0b; //~ ERROR: no valid digits
31     0o123f64; //~ ERROR: octal float literal is not supported
32     0o123.456; //~ ERROR: octal float literal is not supported
33     0b101f64; //~ ERROR: binary float literal is not supported
34     0b111.101; //~ ERROR: binary float literal is not supported
35 }