]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/const-bitshift-rhs-inference.rs
Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik
[rust.git] / src / test / run-pass / const-bitshift-rhs-inference.rs
1 // Copyright 2016 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 const RHS: u8 = 8;
12 const IRHS: i8 = 8;
13 const RHS16: u16 = 8;
14 const IRHS16: i16 = 8;
15 const RHS32: u32 = 8;
16 const IRHS32: i32 = 8;
17 const RHS64: u64 = 8;
18 const IRHS64: i64 = 8;
19 const RHSUS: usize = 8;
20 const IRHSIS: isize = 8;
21
22 fn main() {
23     let _: [&'static str; 1 << RHS] = [""; 256];
24     let _: [&'static str; 1 << IRHS] = [""; 256];
25     let _: [&'static str; 1 << RHS16] = [""; 256];
26     let _: [&'static str; 1 << IRHS16] = [""; 256];
27     let _: [&'static str; 1 << RHS32] = [""; 256];
28     let _: [&'static str; 1 << IRHS32] = [""; 256];
29     let _: [&'static str; 1 << RHS64] = [""; 256];
30     let _: [&'static str; 1 << IRHS64] = [""; 256];
31     let _: [&'static str; 1 << RHSUS] = [""; 256];
32     let _: [&'static str; 1 << IRHSIS] = [""; 256];
33 }