From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:13:28 +0100 Subject: Move /src/test to /tests --- tests/ui/numbers-arithmetic/promoted_overflow.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/ui/numbers-arithmetic/promoted_overflow.rs (limited to 'tests/ui/numbers-arithmetic/promoted_overflow.rs') diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.rs b/tests/ui/numbers-arithmetic/promoted_overflow.rs new file mode 100644 index 00000000000..ba168f773d8 --- /dev/null +++ b/tests/ui/numbers-arithmetic/promoted_overflow.rs @@ -0,0 +1,13 @@ +#![allow(arithmetic_overflow)] + +// run-fail +// error-pattern: overflow +// compile-flags: -C overflow-checks=yes +// for some reason, fails to match error string on +// wasm32-unknown-unknown with stripped debuginfo and symbols, +// so don't strip it +// compile-flags:-Cstrip=none + +fn main() { + let x: &'static u32 = &(0u32 - 1); +} -- cgit 1.4.1-3-g733a5