about summary refs log tree commit diff
path: root/src/test/run-fail/overflowing-sub.rs
AgeCommit message (Collapse)AuthorLines
2020-05-06Move tests from `test/run-fail` to UIYuki Okushi-8/+0
2020-02-18better lint namesRalf Jung-1/+1
2020-02-15adjust run-fail testsRalf Jung-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-05-12Make the `const_err` lint `deny`-by-defaultOliver Schneider-0/+2
2016-10-18Fix some pretty printing testsVadim Petrochenkov-2/+0
2016-08-04Update wording on E0080Shantanu Raj-1/+1
Change "attempted" to "attempt"
2016-06-05trans: use the same messages for both MIR and old arithmetic checks.Eduard Burtescu-1/+1
2016-06-05Enable the overflow-related tests for MIRJames Miller-2/+0
2016-05-22Rename main thread from "<main>" to "main".Wangshan Lu-1/+1
Fix issue #33789
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-0/+4
2015-10-13implement RFC 1229Oliver Schneider-4/+1
const eval errors outside of true constant enviroments are not reported anymore, but instead forwarded to a lint.
2015-03-05rustc: Add a debug_assertions #[cfg] directiveAlex Crichton-0/+1
This commit is an implementation of [RFC 563][rfc] which adds a new `cfg(debug_assertions)` directive which is specially recognized and calculated by the compiler. The flag is turned off at any optimization level greater than 1 and may also be explicitly controlled through the `-C debug-assertions` flag. [rfc]: https://github.com/rust-lang/rfcs/pull/563 The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of the `ndebug` variable and `ndebug` no longer holds any meaning to the standard library. Code which was previously relying on `not(ndebug)` to gate expensive code should be updated to rely on `debug_assertions` instead. Closes #22492 [breaking-change]
2015-03-03Fix the overflowing tests in run-fail.Felix S. Klock II-2/+5
* The error patterns had a typo. * Our current constant evaluation would silently allow the overflow (filed as Issue 22531). * The overflowing-mul test was accidentally doing addition instead of multiplication.
2015-03-03rustc: implement arithmetic overflow checkingCorey Richardson-0/+15
Adds overflow checking to integer addition, multiplication, and subtraction when `-Z force-overflow-checks` is true, or if `--cfg ndebug` is not passed to the compiler. On overflow, it panics with `arithmetic operation overflowed`. Also adds `overflowing_add`, `overflowing_sub`, and `overflowing_mul` intrinsics for doing unchecked arithmetic. [breaking-change]