2016-04-01 02:19:29 -05:00
|
|
|
#![deny(const_err)]
|
|
|
|
|
2018-04-20 07:18:29 -05:00
|
|
|
pub const A: i8 = -std::i8::MIN; //~ ERROR const_err
|
|
|
|
pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err
|
|
|
|
pub const C: u8 = 200u8 * 4; //~ ERROR const_err
|
|
|
|
pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err
|
2018-06-03 16:39:02 -05:00
|
|
|
pub const E: u8 = [5u8][1]; //~ ERROR const_err
|
2016-04-01 02:19:29 -05:00
|
|
|
|
|
|
|
fn main() {
|
2018-01-29 13:47:09 -06:00
|
|
|
let _a = A;
|
|
|
|
let _b = B;
|
|
|
|
let _c = C;
|
|
|
|
let _d = D;
|
|
|
|
let _e = E;
|
2016-05-26 14:09:48 -05:00
|
|
|
let _e = [6u8][1];
|
2016-04-01 02:19:29 -05:00
|
|
|
}
|