about summary refs log tree commit diff
path: root/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs')
-rw-r--r--src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs
new file mode 100644
index 00000000000..a855ef0ec06
--- /dev/null
+++ b/src/test/ui/numbers-arithmetic/overflowing-pow-signed.rs
@@ -0,0 +1,7 @@
+// 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);
+}