diff options
Diffstat (limited to 'tests/ui/consts/const-err-rpass.rs')
-rw-r--r-- | tests/ui/consts/const-err-rpass.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/consts/const-err-rpass.rs b/tests/ui/consts/const-err-rpass.rs new file mode 100644 index 000000000..e7fa10a2a --- /dev/null +++ b/tests/ui/consts/const-err-rpass.rs @@ -0,0 +1,18 @@ +// run-pass +#![allow(dead_code)] +// 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'; + + +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; +} |