about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic
AgeCommit message (Collapse)AuthorLines
2025-09-26Ignore more failing ui tests for GCC backendGuillaume Gomez-0/+2
2025-08-06Print thread ID in panic message if thread name is unknownTrevor Gross-10/+10
`panic!` does not print any identifying information for threads that are unnamed. However, in many cases, the thread ID can be determined. This changes the panic message from something like this: thread '<unnamed>' panicked at src/main.rs:3:5: explicit panic To something like this: thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5: explicit panic Stack overflow messages are updated as well. This change applies to both named and unnamed threads. The ID printed is the OS integer thread ID rather than the Rust thread ID, which should also be what debuggers print.
2025-08-04Rehome tests/ui/issues/ tests [3/?]Oneirical-0/+11
2025-07-23Add `ignore-backends` annotations in failing GCC backend ui testsGuillaume Gomez-0/+1
2025-07-10cleaned up some testsKivooeo-3/+5
2025-07-01moved testsKivooeo-0/+47
2025-06-03cleaned up some testsKivooeo-0/+36
2025-04-17Rollup merge of #139967 - jieyouxu:auxiliary, r=wesleywiserMatthias Krüger-1/+1
Introduce and use specialized `//@ ignore-auxiliary` for test support files instead of using `//@ ignore-test` ### Summary Add a semantically meaningful directive for ignoring test *auxiliary* files. This is for auxiliary files that *participate* in actual tests but should not be built by `compiletest` (i.e. these files are involved through `mod xxx;` or `include!()` or `#[path = "xxx"]`, etc.). ### Motivation A specialized directive like `//@ ignore-auxiliary` makes it way easier to audit disabled tests via `//@ ignore-test`. - These support files cannot use the canonical `auxiliary/` dir because they participate in module resolution or are included, or their relative paths can be important for test intention otherwise. Follow-up to: - #139705 - #139783 - #139740 See also discussions in: - [#t-compiler > Directive name for non-test aux files?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Directive.20name.20for.20non-test.20aux.20files.3F/with/512773817) - [#t-compiler > Handling disabled &#96;//@ ignore-test&#96; tests](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Handling.20disabled.20.60.2F.2F.40.20ignore-test.60.20tests/with/512005974) - [#t-compiler/meetings > &#91;steering&#93; 2025-04-11 Dealing with disabled tests](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/511717981) ### Remarks on remaining unconditionally disabled tests under `tests/` After this PR, against commit 79a272c6402, only **14** remaining test files are disabled through `//@ ignore-test`: <details> <summary>Remaining `//@ ignore-test` files under `tests/`</summary> ``` tests/debuginfo/drop-locations.rs 4://@ ignore-test (broken, see #128971) tests/rustdoc/macro-document-private-duplicate.rs 1://@ ignore-test (fails spuriously, see issue #89228) tests/rustdoc/inline_cross/assoc-const-equality.rs 3://@ ignore-test (FIXME: #125092) tests/ui/match/issue-27021.rs 7://@ ignore-test (#54987) tests/ui/match/issue-26996.rs 7://@ ignore-test (#54987) tests/ui/issues/issue-49298.rs 9://@ ignore-test (#54987) tests/ui/issues/issue-59756.rs 2://@ ignore-test (rustfix needs multiple suggestions) tests/ui/precondition-checks/write.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/read.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/write_bytes.rs 5://@ ignore-test (unimplemented) tests/ui/explicit-tail-calls/drop-order.rs 2://@ ignore-test: tail calls are not implemented in rustc_codegen_ssa yet, so this causes 🧊 tests/ui/panics/panic-short-backtrace-windows-x86_64.rs 3://@ ignore-test (#92000) tests/ui/json/json-bom-plus-crlf-multifile-aux.rs 3://@ ignore-test Not a test. Used by other tests tests/ui/traits/next-solver/object-soundness-requires-generalization.rs 2://@ ignore-test (see #114196) ``` </details> Of these, most are either **unimplemented**, or **spurious**, or **known-broken**. The outstanding one is `tests/ui/json/json-bom-plus-crlf-multifile-aux.rs` which I did not want to touch in *this* PR -- that aux file has load-bearing BOM and carriage returns and byte offset matters. I think those test files that require special encoding / BOM probably are better off as `run-make` tests. See #139968 for that aux file. ### Review advice - Best reviewed commit-by-commit. - The directive name diverged from the most voted `//@ auxiliary` because I think that's easy to confuse with `//@ aux-{crate,dir}`. r? compiler
2025-04-17tests: use `//@ ignore-auxiliary` with backlinked primary test fileJieyou Xu-1/+1
2025-04-16Cleaned up base tests for `isize` and `usize` in `tests/ui/numbers-arithmetic`Spencer-12/+50
2025-02-06Remove some unnecessary parens in `assert!` conditionsEsteban Küber-22/+22
While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
2025-01-23tests: use `needs-threads` instead of `ignore-emscripten`许杰友 Jieyou Xu (Joe)-2/+2
2025-01-23tests: use `needs-subprocess` instead of `ignore-{wasm32,emscripten,sgx}`许杰友 Jieyou Xu (Joe)-8/+8
2024-11-26tests: remove `//@ pretty-expanded` usages许杰友 Jieyou Xu (Joe)-4/+0
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
2024-09-22Don't call const normalize in error reportingMichael Goulet-40/+40
2024-09-20Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errorsbors-0/+3
Disallow hidden references to mutable static Closes #123060 Tracking: - https://github.com/rust-lang/rust/issues/123758
2024-09-13Update tests for hidden references to mutable staticObei Sideg-0/+3
2024-09-12move a test to a better locationRalf Jung-17/+0
2024-09-10clean up internal comments about float semanticsRalf Jung-0/+1
- remove an outdated FIXME - add reference to floating-point semantics issue Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-06-16Rollup merge of #126127 - Alexendoo:other-trait-diag, r=pnkfelixJacob Pratt-81/+81
Spell out other trait diagnostic I recently saw somebody confused about the diagnostic thinking it was suggesting to add an `as` cast. This change is longer but I think it's clearer
2024-06-14Remove f16 const eval crash testTrevor Gross-0/+4
Const eval negation was added. This test is now covered by Miri tests, and merged into an existing UI test. Fixes <https://github.com/rust-lang/rust/issues/124583>
2024-06-12Spell out other trait diagnosticAlex Macleod-81/+81
2024-04-22Stabilize generic `NonZero`.Markus Reiter-1/+0
2024-04-21Auto merge of #117457 - daxpedda:wasm-nontrapping-fptoint, r=wesleywiserbors-6/+0
Stabilize Wasm target features that are in phase 4 and 5 This stabilizes the Wasm target features that are known to be working and in [phase 4 and 5](https://github.com/WebAssembly/proposals/tree/04fa8c810e1dc99ab399e41052a6e427ee988180). Feature stabilized: - [Non-trapping float-to-int conversions](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) - [Import/Export of Mutable Globals](https://github.com/WebAssembly/mutable-global) - [Sign-extension operators](https://github.com/WebAssembly/sign-extension-ops) - [Bulk memory operations](https://github.com/WebAssembly/bulk-memory-operations) - [Extended Constant Expressions](https://github.com/WebAssembly/extended-const) Features not stabilized: - [Multi-value](https://github.com/WebAssembly/multi-value): requires rebuilding `std` #73755. - [Reference Types](https://github.com/WebAssembly/reference-types): no point stabilizing without #103516. - [Threads](https://github.com/webassembly/threads): requires rebuilding `std` #77839. - [Relaxed SIMD](https://github.com/WebAssembly/relaxed-simd): separate PR #117468. - [Multi Memory](https://github.com/WebAssembly/multi-memory): not implemented. See https://github.com/rust-lang/rust/pull/117457#issuecomment-1787648070 for more context. Documentation: https://github.com/rust-lang/reference/pull/1420 Tracking issue: https://github.com/rust-lang/rust/issues/44839
2024-04-18Stabilize Wasm phase 4 & 5 proposalsdaxpedda-6/+0
2024-04-18Fix negating `f16` and `f128` constantsbeetrees-0/+16
2024-03-27Use `TraitRef::to_string` sorting in favor of `TraitRef::ord`, as the latter ↵Oli Scherer-41/+41
compares `DefId`s which we need to avoid
2024-03-11Update test directives for `wasm32-wasip1`Alex Crichton-10/+0
* The WASI targets deal with the `main` symbol a bit differently than native so some `codegen` and `assembly` tests have been ignored. * All `ignore-emscripten` directives have been updated to `ignore-wasm32` to be more clear that all wasm targets are ignored and it's not just Emscripten. * Most `ignore-wasm32-bare` directives are now gone. * Some ignore directives for wasm were switched to `needs-unwind` instead. * Many `ignore-wasm32*` directives are removed as the tests work with WASI as opposed to `wasm32-unknown-unknown`.
2024-02-25Use generic `NonZero` in tests.Markus Reiter-3/+3
2024-02-21consolidate testsJames Dietz-674/+0
2024-02-17Enable `ConstPropLint` for promotedsGurinder Singh-8/+0
This fixes the issue wherein the lint didn't fire for promoteds in the case of SHL/SHR operators in non-optimized builds and all arithmetic operators in optimized builds
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-166/+166
2024-01-27Update tests.Markus Reiter-1/+1
2024-01-05remove duplicate testRalf Jung-23/+0
2023-11-29Auto merge of #114841 - bvanjoi:fix-114814, r=cuviperbors-0/+77
add track_caller for arith ops Fixes #114814 `#[track_caller]` is works, r? `@scottmcm`
2023-11-27Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviperbors-1/+0
Update the minimum external LLVM to 16. With this change, we'll have stable support for LLVM 16 and 17. For reference, the previous increase to LLVM 15 was #114148 [Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
2023-11-24Show number in error message even for one errorNilstrieb-10/+10
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24add track_caller for arith opsbohan-0/+77
2023-11-21Update the minimum external LLVM to 16.Dario Nieuwenhuis-1/+0
2023-11-07manually bless a wasm-only testRalf Jung-0/+6
2023-07-29Change default panic handler message format.Mara Bos-7/+12
2023-07-26Add test case for #109567yukang-0/+15
2023-06-27Don't sort strings right after we just sorted by typesMichael Goulet-41/+41
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-18/+18
2023-05-11Add support for `cfg(overflow_checks)`AngelicosPhosphoros-0/+38
This PR adds support for detecting if overflow checks are enabled in similar fashion as debug_assertions are detected. Possible use-case of this, for example, if we want to use checked integer casts in builds with overflow checks, e.g. ```rust pub fn cast(val: usize)->u16 { if cfg!(overflow_checks) { val.try_into().unwrap() } else{ vas as _ } } ``` Resolves #91130. Tracking issue: #111466.
2023-04-20Implement `Neg` for signed non-zero integers.John Millikin-0/+12
Negating a non-zero integer currently requires unpacking to a primitive and re-wrapping. Since negation of non-zero signed integers always produces a non-zero result, it is safe to implement `Neg` for `NonZeroI{N}`. The new `impl` is marked as stable because trait implementations for two stable types can't be marked unstable.
2023-04-15Add some reasons why tests are ignored.Eric Huss-1/+1
2023-03-02Auto merge of #107879 - icedrocket:update-llvm, r=cuviperbors-0/+17
Update LLVM submodule Fixes #105626
2023-02-23Add regression test for #105626icedrocket-0/+17
2023-01-18Support `true` and `false` as boolean flag paramsNilstrieb-1/+1
Implements MCP 577.