rust/tests
Jubilee 4db9554358
Rollup merge of #142302 - JonathanBrouwer:invalid-const-token, r=jdonszelmann
Rework how the disallowed qualifier in function type diagnostics are generated

This pull request fixes two independent issues:
1. When qualifiers of a function type ptr are in the wrong order and one of them is async/const (not permitted on function types), the diagnostic suggests removing the incorrect qualifier.  Fixes https://github.com/rust-lang/rust/issues/142268, which is an issue created by https://github.com/rust-lang/rust/pull/133151. This is fixed by moving the check into `parse_fn_front_matter`, where better span information is available to generate the right suggestions.
2. When qualifiers of a function type ptr are in the wrong order and one of them is async/const (not permitted on function types), `cargo fix` crashes because "cannot replace slice of data that was already replaced". This is fixed by not generating a suggestion for the "wrong order" diagnostic if the "disallowed qualifier" diagnostic is triggered.

There is a commit with failing tests so the test diff is clearer
r? `@jdonszelmann`
2025-06-13 20:59:17 -07:00
..
assembly Add new Tier-3 targets: loongarch32-unknown-none* 2025-06-06 08:19:38 +08:00
auxiliary stabilize naked_functions 2025-04-20 11:18:38 +02:00
codegen Rollup merge of #142176 - workingjubilee:dont-shuffle-bswaps-per-arch, r=nikic 2025-06-13 05:19:15 +02:00
codegen-units Remove mono item collection strategy override from -Zprint-mono-items 2025-05-09 12:19:09 +02:00
coverage coverage: Revert "unused local file IDs" due to empty function names 2025-05-27 23:33:29 +10:00
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Rollup merge of #142240 - fee1-dead-contrib:push-zkkzoxlymslv, r=oli-obk 2025-06-10 16:54:51 +02:00
debuginfo tests: Change "fastcall" to "system" in some tests 2025-06-09 16:10:21 -07:00
incremental tests: Change "fastcall" to "system" in some tests 2025-06-09 16:10:21 -07:00
mir-opt intrinsics: rename min_align_of to align_of 2025-06-12 17:50:25 +02:00
pretty Rollup merge of #134847 - dtolnay:asymmetrical, r=fmease 2025-06-13 05:16:54 +02:00
run-make Rollup merge of #142297 - jieyouxu:needs-target-std, r=Kobzol 2025-06-11 13:48:11 +02:00
rustdoc Auto merge of #142443 - matthiaskrgr:rollup-l1l6d0v, r=matthiaskrgr 2025-06-13 17:44:15 +00:00
rustdoc-gui Rollup merge of #139831 - lolbinarycat:rustdoc-mobile-sidebar, r=GuillaumeGomez 2025-05-25 04:00:55 +02:00
rustdoc-js yeet CanonicalVarInfo 2025-05-23 12:10:53 +00:00
rustdoc-js-std Consistent trait bounds for ExtractIf Debug impls 2025-05-05 19:46:46 -07:00
rustdoc-json rustdoc-json: Rearrange deck chairs in ABI testing 2025-06-09 16:11:06 -07:00
rustdoc-ui Auto merge of #142008 - RalfJung:const-eval-error-here, r=oli-obk 2025-06-08 23:18:34 +00:00
ui Rollup merge of #142302 - JonathanBrouwer:invalid-const-token, r=jdonszelmann 2025-06-13 20:59:17 -07:00
ui-fulldeps Auto merge of #134841 - estebank:serde-attr-4, r=wesleywiser 2025-06-13 22:59:24 +00:00
COMPILER_TESTS.md