aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/unary_negation.rs
blob: bb59d19eed862b2d832ba4cb2c20f8e885e1abd6 (plain)
1
2
3
4
5
6
7
8
fn main() {
    let a: i32 = -1;
    let b: i32 = 3 - -1;
    let c: bool = !false;
    let d: i32 = !3;

    let e: f32 = -true; // // { dg-error "cannot apply unary - to bool" }
}