rust/tests/codegen/simd
bors 71b68da1bd Auto merge of #139578 - ferrocene:pa-compiletest-edition, r=jieyouxu
Fix breakage when running compiletest with `--test-args=--edition=2015`

Compiletest has an `--edition` flag to change the default edition tests are run with. Unfortunately no test suite successfully executes when that flag is passed. If the edition is set to something greater than 2015 the breakage is expected, since the test suite currently supports only edition 2015 (Ferrous Systems will open an MCP about fixing that soonish). Surprisingly, the test suite is also broken if `--edition=2015` is passed to compiletest. This PR focuses on fixing the latter.

This PR fixes the two categories of failures happening when `--edition=2015` is passed:

* Some edition-specific tests set their edition through `//@ compile-flags` instead of `//@ edition`. Compiletest doesn't parse the compile flags, so it would see no `//@ edition` and add another `--edition` flag, leading to a rustc error.
* Compiletest would add the edition after `//@ compile-flags`, while some tests depend on flags passed to `//@ compile-flags` being the last flags in the rustc invocation.

Note that for the first category, I opted to manually go and replace all `//@ compile-flags` setting an edition with an explicit `//@ edition`. We could've changed compiletest to instead check whether an edition was set in `//@ compile-flags`, but I thought it was better to enforce a consistent way to set the edition in tests.

I also added the edition to the stamp, so that changing `--edition` results in tests being re-executed.

r? `@jieyouxu`
2025-04-11 10:53:45 +00:00
..
extract-insert-dyn.rs add simd_insert_dyn and simd_extract_dyn 2025-04-10 21:22:07 +02:00
packed-simd-alignment.rs Test codegen for repr(packed,simd) 2024-06-02 04:13:35 -07:00
packed-simd.rs x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00
project-to-simd-array-field.rs Rework OperandRef::extract_field to stop calling to_immediate_scalar on things which are already immediates 2025-02-19 12:03:40 -08:00
simd_arith_offset.rs use the right feature in codegen tests 2025-02-27 12:23:00 +01:00
simd-wide-sum.rs replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
swap-simd-types.rs Ensure swap_nonoverlapping is really always untyped 2025-04-09 09:09:37 -07:00
unpadded-simd.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00