diff options
Diffstat (limited to 'tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs')
-rw-r--r-- | tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs new file mode 100644 index 000000000..f2643c164 --- /dev/null +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -0,0 +1,8 @@ +// run-fail +// error-pattern:thread 'main' panicked at 'attempt to multiply with overflow' +// ignore-emscripten no processes +// compile-flags: -C debug-assertions + +fn main() { + let _x = 2u32.pow(1024); +} |