1
Fork 0
rust/tests/ui/abi
Nicholas Nethercote 2fef0a30ae Replace infallible name_or_empty methods with fallible name methods.
I'm removing empty identifiers everywhere, because in practice they
always mean "no identifier" rather than "empty identifier". (An empty
identifier is impossible.) It's better to use `Option` to mean "no
identifier" because you then can't forget about the "no identifier"
possibility.

Some specifics:
- When testing an attribute for a single name, the commit uses the
  `has_name` method.
- When testing an attribute for multiple names, the commit uses the new
  `has_any_name` method.
- When using `match` on an attribute, the match arms now have `Some` on
  them.

In the tests, we now avoid printing empty identifiers by not printing
the identifier in the `error:` line at all, instead letting the carets
point out the problem.
2025-04-17 09:50:52 +10:00
..
cross-crate tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
extern tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
foreign tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issues Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
mir Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
numbers-arithmetic Ensure tests don't fail on i586 in CI 2024-07-01 17:39:30 +01:00
statics Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
struct-enums Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
union Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
abi-sysv64-arg-passing.rs Enable more tests on Windows 2025-02-03 10:39:32 -05:00
abi-sysv64-register-usage.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
abi-typo-unstable.feature_disabled.stderr update/bless tests 2025-04-06 21:41:47 +02:00
abi-typo-unstable.feature_enabled.stderr update/bless tests 2025-04-06 21:41:47 +02:00
abi-typo-unstable.rs update/bless tests 2025-04-06 21:41:47 +02:00
anon-extern-mod.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
arm-unadjusted-intrinsic.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
c-stack-as-value.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
c-stack-returning-int64.rs Use the rustc_private libc less in tests 2024-04-15 08:54:11 -04:00
c-zst.aarch64-darwin.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
c-zst.powerpc-linux.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
c-zst.rs use add-core-stubs / minicore for a few more tests 2025-02-16 18:37:50 +01:00
c-zst.s390x-linux.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
c-zst.sparc64-linux.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
c-zst.x86_64-linux.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
c-zst.x86_64-pc-windows-gnu.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
cabi-int-widening.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
compatibility.rs add FCW to warn about wasm ABI transition 2025-03-25 08:22:35 +01:00
debug.rs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
debug.stderr Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
explicit_repr_rust.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fixed_x18.rs UI tests: migrate remaining compile time error-patterns to line annotations 2025-04-13 21:48:53 +03:00
homogenous-floats-target-feature-mixup.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
issue-28676.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
large-byval-align.rs Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
lib-defaults.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
nullable-pointer-ffi-compat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
relocation_model_pic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
riscv-discoverability-guidance.riscv32.stderr Rollup merge of #137771 - estebank:abi-sugg, r=compiler-errors 2025-03-01 05:49:56 +01:00
riscv-discoverability-guidance.riscv64.stderr Rollup merge of #137771 - estebank:abi-sugg, r=compiler-errors 2025-03-01 05:49:56 +01:00
riscv-discoverability-guidance.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
rust-cold-works-with-rustic-args.rs compiler: use is_rustic_abi in ty_utils 2025-03-04 19:57:51 -08:00
rustcall-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
segfault-no-out-of-stack.rs Insert null checks for pointer dereferences when debug assertions are enabled 2025-01-31 11:13:34 +00:00
shadow-call-stack-without-fixed-x18.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
simd-abi-checks-avx.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
simd-abi-checks-avx.stderr Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
simd-abi-checks-empty-list.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
simd-abi-checks-empty-list.stderr mono-time abi_check: unify error paths for call and definition sites 2025-02-20 11:55:31 +01:00
simd-abi-checks-s390x.rs Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
simd-abi-checks-s390x.z10.stderr mono-time abi_check: unify error paths for call and definition sites 2025-02-20 11:55:31 +01:00
simd-abi-checks-s390x.z13_no_vector.stderr mono-time abi_check: unify error paths for call and definition sites 2025-02-20 11:55:31 +01:00
simd-abi-checks-s390x.z13_soft_float.stderr mono-time abi_check: unify error paths for call and definition sites 2025-02-20 11:55:31 +01:00
simd-abi-checks-sse.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
simd-abi-checks-sse.stderr vectorcall ABI: error if sse2 is not available 2025-02-20 12:40:58 +01:00
sparcv8plus-llvm19.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus-llvm19.sparc.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus-llvm19.sparc_cpu_v9.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus-llvm19.sparc_cpu_v9_feature_v8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus-llvm19.sparc_feature_v8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus-llvm19.sparcv8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.sparc.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.sparc_cpu_v9.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.sparc_cpu_v9_feature_v8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.sparc_feature_v8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
sparcv8plus.sparcv8plus.stderr tests: use minicore more 2025-02-24 09:26:54 +00:00
stack-probes-lto.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
stack-probes.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
stack-protector.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
sysv64-zst.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
sysv64-zst.stderr adjust Layout debug printing to match the internal field names 2025-02-28 16:32:15 +01:00
unsized-args-in-c-abi-issues-94223-115845.rs Delete tuple unsizing 2025-02-27 10:26:33 +00:00
unsupported.aarch64.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
unsupported.arm.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
unsupported.i686.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
unsupported.riscv32.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
unsupported.riscv64.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
unsupported.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
unsupported.x64.stderr Bless UI tests 2025-03-03 09:03:04 +01:00
variadic-ffi.rs Allow "C-unwind" fn to have C variadics 2024-06-22 15:14:14 -07:00
vectorcall-abi-checks.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
vectorcall-abi-checks.stderr vectorcall ABI: error if sse2 is not available 2025-02-20 12:40:58 +01:00
x86stdcall.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
x86stdcall2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00