rust/tests/assembly
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
..
asm Create a generic AVR target: avr-none 2025-02-19 19:01:51 +01:00
auxiliary Add tests for -Zdwarf-version lto behavior 2025-02-08 16:33:36 +00:00
compiletest-self-test tests/assembly: add minicore compiletest self-test 2024-10-31 18:20:11 +08:00
libs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
naked-functions support XCOFF in naked_asm! 2025-03-08 14:10:29 +01:00
nvptx-kernel-abi Restore previous ABI for f_single_u8_arg 2025-01-26 14:14:33 +00:00
sanitizer/kcfi KCFI: Add KCFI arity indicator support 2025-04-05 04:05:04 +00:00
simd tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
stack-protector Rollup merge of #137957 - Noratrieb:no, r=wesleywiser 2025-03-07 21:57:50 -05:00
targets Target definition for wasm32-wali-linux-musl to support the Wasm Linux 2025-03-10 21:26:45 -04:00
aarch64-pointer-auth.rs Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
align_offset.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
breakpoint.rs Add core::arch::breakpoint and test 2024-12-02 23:56:24 -08:00
closure-inherit-target-feature.rs x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00
cmse.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
cstring-merging.rs replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
dwarf4.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
dwarf5.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
dwarf-mixed-versions-lto.rs DWARF mixed versions with LTO on MIPS 2025-02-24 11:58:38 +01:00
is_aligned.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
issue-83585-small-pod-struct-equality.rs Fix tests for 32 bits targets 2024-06-11 07:45:16 +00:00
manual-eq-efficient.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
niche-prefer-zero.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-arch-default.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-arch-emit-asm.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-arch-link-arg.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-arch-target-cpu.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
nvptx-atomics.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-c-abi-arg-v7.rs NVPTX:_Especially add the DoubleI32 struct as a nvptx abi test case since it was used as an example when discussing possible problems 2024-05-31 23:12:33 +02:00
nvptx-c-abi-ret-v7.rs NVPTX:_Especially add the DoubleI32 struct as a nvptx abi test case since it was used as an example when discussing possible problems 2024-05-31 23:12:33 +02:00
nvptx-internalizing.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-linking-binary.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-linking-cdylib.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
nvptx-safe-naming.rs NVPTX: Enable previously disabled tests 2024-03-11 13:35:58 +01:00
panic-no-unwind-no-uwtable.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
panic-unwind-no-uwtable.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
pic-relocation-model.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
pie-relocation-model.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
powerpc64-struct-abi.rs Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
riscv-soft-abi-with-float-features.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
rust-abi-arg-attr.rs remove support for rustc_intrinsic_must_be_overridden from the compiler 2025-02-24 07:53:59 +01:00
s390x-backchain-toggle.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
s390x-vector-abi.rs Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
simd-bitmask.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-gather.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-mask-load.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-mask-reduce.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-mask-store.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-scatter.rs update/bless tests 2025-04-06 21:41:47 +02:00
simd-intrinsic-select.rs update/bless tests 2025-04-06 21:41:47 +02:00
slice-is_ascii.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
small_data_threshold.rs Remove a footgun-y feature / relic of the past from the compiletest DSL 2025-02-03 05:45:18 +01:00
sparc-struct-abi.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
stack-probes.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
static-relocation-model.rs Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
strict_provenance.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
target-feature-multiple.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
wasm_exceptions.rs Fix wasm_exceptions test 2024-06-19 21:26:48 +01:00
x86_64-array-pair-load-store-merge.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-bigint-helpers.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-cmp.rs Lower BinOp::Cmp to llvm.{s,u}cmp.* intrinsics 2025-03-06 22:29:05 +08:00
x86_64-floating-point-clamp.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-fortanix-unknown-sgx-lvi-generic-load.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs Run rustfmt on tests/assembly/. 2024-05-30 16:15:46 +10:00
x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
x86_64-function-return.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-no-jump-tables.rs tests/assembly: use -Copt-level=3 instead of -O 2025-02-08 19:02:32 -08:00
x86_64-sse_crc.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
x86_64-typed-swap.rs Ensure swap_nonoverlapping is really always untyped 2025-04-09 09:09:37 -07:00
x86_64-windows-float-abi.rs tests: adjust expectation for f128 abi on Windows 2025-04-10 15:28:56 -04:00
x86_64-windows-i128-abi.rs x86_win64 ABI: do not use xmm0 with softfloat ABI 2025-02-19 08:41:19 +01:00
x86-return-float.rs x86-sse2 ABI: use SSE registers for floats and SIMD 2025-02-18 16:11:41 +01:00