rust/tests/ui/consts/const-err-rpass.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
365 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
2016-05-02 04:26:29 -05:00
// check for const_err regressions
const X: *const u8 = b"" as _;
const Y: bool = 'A' == 'B';
const Z: char = 'A';
const W: bool = Z <= 'B';
2016-05-02 04:26:29 -05:00
fn main() {
let _ = ((-1 as i8) << 8 - 1) as f32;
let _ = 0u8 as char;
let _ = true > false;
let _ = true >= false;
let _ = true < false;
let _ = true >= false;
2016-05-02 04:26:29 -05:00
}