rust/tests
Guillaume Gomez 5f2dae19c4
Rollup merge of #140622 - petrochenkov:annusexp, r=jieyouxu
compiletest: Improve diagnostics for line annotation mismatches

When some line annotations are missing or misplaced, compiletest reports an error, but the error is not very convenient.
This PR attempts to improve the user experience.

- The "expected ... not found" messages are no longer duplicated.
- The `proc_res.status` and `proc_res.cmdline` message is no longer put in the middle of other messages describing the annotation mismatches, it's now put into the end.
- Compiletest now makes suggestions if there are fuzzy matches between expected and actually reported errors (e.g. the annotation is put on a wrong line).
- Missing diagnostic kinds are no longer produce an error eagerly, but instead treated as always mismatching kinds, so they can produce suggestions telling the right kind.

I'll post screenshots in the thread below, but the behavior shown on the screenshots can be reproduced locally using the new test `tests/ui/compiletest-self-test/line-annotation-mismatches.rs`.

This also fixes https://github.com/rust-lang/rust/issues/140940.

r? ``@jieyouxu``
2025-06-24 11:20:06 +02:00
..
assembly Rollup merge of #140920 - RalfJung:target-feature-unification, r=nnethercote,WaffleLapkin 2025-06-20 02:50:38 -04:00
auxiliary tests: Adopt ABI transmute tests from crashtests 2025-06-23 09:40:00 -07:00
codegen fix -Zmin-function-alignment without attributes 2025-06-23 20:26:04 +02:00
codegen-units Fix tests to drop now-skipped codegen 2025-06-22 12:03:42 -04:00
coverage coverage: Revert "unused local file IDs" due to empty function names 2025-05-27 23:33:29 +10:00
coverage-run-rustdoc
crashes tests: Adopt ABI transmute tests from crashtests 2025-06-23 09:40:00 -07:00
debuginfo tests: {Meta,Pointee}Sized in non-minicore tests 2025-06-16 23:04:33 +00:00
incremental compiletest: Improve diagnostics for line annotation mismatches 2025-06-23 21:30:56 +03:00
mir-opt Rollup merge of #142571 - cjgillot:borrowed-classes, r=oli-obk 2025-06-20 23:25:55 -04:00
pretty Rollup merge of #134847 - dtolnay:asymmetrical, r=fmease 2025-06-13 05:16:54 +02:00
run-make Rollup merge of #142845 - dpaoliello:textrel-on-minimal-lib, r=jieyouxu 2025-06-22 08:49:07 +02:00
rustdoc rustdoc: PointeeSized bounds with extern types 2025-06-16 23:04:36 +00:00
rustdoc-gui rustdoc: make srcIndex no longer a global variable 2025-06-16 20:22:24 -05:00
rustdoc-js yeet CanonicalVarInfo 2025-05-23 12:10:53 +00:00
rustdoc-js-std add doc(alias("AsciiChar")) to core::ascii::Char 2025-06-20 11:11:51 -05:00
rustdoc-json Port #[must_use] to new attribute parsing infrastructure 2025-06-22 14:51:58 +02:00
rustdoc-ui rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
ui Rollup merge of #140622 - petrochenkov:annusexp, r=jieyouxu 2025-06-24 11:20:06 +02:00
ui-fulldeps Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obk 2025-06-22 14:03:44 +00:00
COMPILER_TESTS.md