rust/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs

8 lines
173 B
Rust
Raw Normal View History

2020-04-16 06:50:32 +00:00
// run-fail
// error-pattern:thread 'main' panicked at 'attempt to multiply with overflow'
// compile-flags: -C debug-assertions
fn main() {
let _x = 2i32.pow(1024);
}