blob: 8f0bb87f558d354100f4abbc5757384c4b7f55a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
extern "C"
{
pub fn abort ();
}
struct B { b: bool }
pub fn main ()
{
let n = 1;
if 0 > -n { } else { unsafe { abort (); } }
let b = true;
if !b { unsafe { abort (); } }
if !!b { } else { unsafe { abort (); } }
let bb = B { b: false };
if !bb.b && !b { unsafe { abort (); } }
if (B { b: true }).b { } else { unsafe { abort (); } }
}
|