aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/shadow1.rs
blob: cef972adf3391e9eaf0f2ba100968a446ae5920f (plain)
1
2
3
4
5
6
fn main() {
    let mut x = 5;
    let mut x;
    x = true;
    x = x + 2; // { dg-error "cannot apply this operator to types bool and <integer>"  }
}