rust/tests/ui/numbers-arithmetic
Matthias Krüger 026d56b0f6
Rollup merge of #139967 - jieyouxu:auxiliary, r=wesleywiser
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?](512773817)
- [#t-compiler > Handling disabled `//@ ignore-test` tests](512005974)
- [#t-compiler/meetings > [steering] 2025-04-11 Dealing with disabled tests](511717981)

### Remarks on remaining unconditionally disabled tests under `tests/`

After this PR, against commit 79a272c640, 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-17 21:53:25 +02:00
..
apfloat-modulo-wrong.rs
arith-unsigned.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
div-mod.rs
divide-by-zero.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
f16-f128-lit.rs
float-int-invalid-const-cast.rs
float-literal-inference.rs
float-nan.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
float-signature.rs
float.rs
float2.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
float_math.rs
floatlits.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
i8-incr.rs
i32-sub.rs
i128.rs
int-abs-overflow.rs tests: use needs-threads instead of ignore-emscripten 2025-01-23 20:51:29 +08:00
integer-literal-radix.rs
integer-literal-suffix-inference-2.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
integer-literal-suffix-inference-3.rs
integer-literal-suffix-inference.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
isize-base.rs Cleaned up base tests for isize and usize in tests/ui/numbers-arithmetic 2025-04-16 08:55:50 -06:00
issue-8460.rs tests: use needs-threads instead of ignore-emscripten 2025-01-23 20:51:29 +08:00
location-add-assign-overflow.rs
location-add-overflow.rs
location-divide-assign-by-zero.rs
location-divide-by-zero.rs
location-mod-assign-by-zero.rs
location-mod-by-zero.rs
location-mul-assign-overflow.rs
location-mul-overflow.rs
location-sub-assign-overflow.rs
location-sub-overflow.rs
mod-zero.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
next-power-of-two-overflow-debug.rs
next-power-of-two-overflow-ndebug.rs
not-suggest-float-literal.rs
not-suggest-float-literal.stderr Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00
num-wrapping.rs
numeric-method-autoexport.rs
overflow-attribute-works-1.rs
overflow-attribute-works-2.rs
overflowing-add.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
overflowing-lsh-4.rs
overflowing-lsh-4.stderr
overflowing-mul.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
overflowing-neg-nonzero.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
overflowing-pow-signed.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
overflowing-pow-unsigned.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
overflowing-rsh-4.rs
overflowing-rsh-4.stderr
overflowing-sub.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
promoted_overflow.rs
saturating-float-casts-impl.rs tests: use //@ ignore-auxiliary with backlinked primary test file 2025-04-17 19:45:28 +08:00
saturating-float-casts-wasm.rs
saturating-float-casts.rs
shift-near-oflo.rs Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
shift-various-types.rs
shift.rs
signed-shift-const-eval.rs
suggest-float-literal.fixed
suggest-float-literal.rs
suggest-float-literal.stderr Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00
u8-incr-decr.rs
u8-incr.rs
u32-decr.rs
u128-as-f32.rs
u128.rs
unary-minus-suffix-inference.rs
usize-base.rs Cleaned up base tests for isize and usize in tests/ui/numbers-arithmetic 2025-04-16 08:55:50 -06:00