diff options
Diffstat (limited to 'src/test/ui/numbers-arithmetic/promoted_overflow.rs')
| -rw-r--r-- | src/test/ui/numbers-arithmetic/promoted_overflow.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/promoted_overflow.rs b/src/test/ui/numbers-arithmetic/promoted_overflow.rs new file mode 100644 index 00000000000..da59e81ed6b --- /dev/null +++ b/src/test/ui/numbers-arithmetic/promoted_overflow.rs @@ -0,0 +1,9 @@ +#![allow(arithmetic_overflow)] + +// run-fail +// error-pattern: overflow +// compile-flags: -C overflow-checks=yes + +fn main() { + let x: &'static u32 = &(0u32 - 1); +} |
