summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/overflowing-lsh-2.rs
blob: 7fd3407a056ef80161405cf7a387027fbae2764b (plain)
1
2
3
4
5
6
7
8
9
// build-fail
// compile-flags: -C debug-assertions

#![deny(arithmetic_overflow, const_err)]

fn main() {
    let _x = 1 << -1;
    //~^ ERROR: this arithmetic operation will overflow
}