about summary refs log tree commit diff
path: root/src/test/ui/numbers-arithmetic
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-3352/+0
2022-12-05Tweak "the following other types implement trait"Esteban Küber-164/+65
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-10-07make const_err a hard errorRalf Jung-97/+92
2022-09-23Restore ignore tagFlorian Bartels-1/+0
This test case actually requires std::process.
2022-06-22use `-Cstrip=debuginfo` with ui tests to reduce disk space usageklensy-0/+4
2022-04-04Refer to the TraitRef::identity in the message to be clearerEsteban Kuber-20/+20
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-97/+97
2022-04-04Fix list lengthEsteban Kuber-0/+80
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-0/+120
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
2022-03-19Add needs-unwind directive to tests where necessarybjorn3-0/+1
2022-03-01Miri/CTFE: properly treat overflow in (signed) division/rem as UBRalf Jung-57/+51
2022-02-26suggest a float literal when dividing a floating-point type by {integer}Takayuki Maeda-0/+325
fix a message implement a rustfix-applicable suggestion implement `suggest_floating_point_literal` add `ObligationCauseCode::BinOp` remove duplicate code fix function names in uitests use `Diagnostic` instead of `DiagnosticBuilder`
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+2
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-24Remove `-Z force-overflow-checks`Noah Lev-1/+1
It was replaced several years ago by the stable option `-C overflow-checks`. The goal was to delete the `-Z` flag once users had migrated [1]. Now that it's been several years, it makes sense to delete the old flag. See also the discussion on Zulip [2]. [1]: https://github.com/rust-lang/rust/issues/33134#issuecomment-280484097 [2]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/overflow.20checks/near/262497224
2021-11-06Move some tests to more reasonable directoriesCaio-0/+23
2021-01-16Move some tests to more reasonable directories - 2Caio-0/+562
Address comments Update limits
2020-11-29Update tests to remove old numeric constantsbstrie-21/+13
Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-09-26Make invalid integer operation messages consistentvarkor-10/+10
2020-09-05Add Arith Tests in LibraryAyush Kumar Mishra-41/+0
2020-07-02Address review comments and add UI testChristopher Serr-500/+523
2020-06-30Stabilize `#[track_caller]`.Adam Perry-1/+0
Does not yet make its constness stable, though. Use of `Location::caller` in const contexts is still gated by `#![feature(const_caller_location)]`.
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-10/+10
propagation
2020-06-10Migrate to numeric associated constsLzu Tao-11/+11
2020-05-09Rollup merge of #71185 - JohnTitor:run-fail, r=petrochenkovRalf Jung-0/+343
Move tests from `test/run-fail` to UI Fixes #65440 cc #65865 #65506 r? @nikomatsakis
2020-05-08Skip tests on emscriptenYuki Okushi-0/+10
2020-05-06Fixup tests to test both const-eval and runtimeMark Rousskov-99/+22
2020-05-06Pull in miri test casesMark Rousskov-5/+458
2020-05-06Define UB in float-to-int casts to saturateMark Rousskov-1/+0
- Round to zero, and representable values cast directly. - `NaN` goes to 0 - Values beyond the limits of the type are saturated to the "nearest value" (essentially rounding to zero, in some sense) in the integral type, so e.g. `f32::INFINITY` would go to `{u,i}N::MAX.`
2020-05-06Move tests from `test/run-fail` to UIYuki Okushi-0/+333
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-1/+1
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-8/+1
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-1/+8
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-8/+1
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-08-15Group all ui tests and move to abi #62593Kevin Per-31/+0
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+1693