rust/tests
Jacob Pratt 6da26f7cfe
Rollup merge of #138552 - jieyouxu:print-request-cleanups, r=Urgau
Misc print request handling cleanups + a centralized test for print request stability gating

I was working on implementing `--print=supported-crate-types`, then I noticed some things that were mildly annoying me, so I pulled out these changes. In this PR:

- First commit adds a centralized test `tests/ui/print/stability.rs` that is responsible for exercising stability gating of the print requests.
    - AFAICT we didn't have any test that systematically checks this.
    - I coalesced `tests/ui/feature-gates/feature-gate-print-check-cfg.rs` (for `--print=check-cfg`) into this test too, since `--print=check-cfg` is only `-Z unstable-options`-gated like other unstable print requests, and is not additionally feature-gated. cc ``@Urgau`` in case you have any concerns.
- Second commit alphabetically sorts the `PrintKind` enum for consistency because the `PRINT_KINDS` list (using the enum) is *already* alphabetically sorted.
- Third commit pulls out two helpers:
    1. A helper `check_print_request_stability` for checking stability of print requests and the diagnostics for using unstable print requests without `-Z unstable-options`, to avoid repeating the same logic over and over.
    2. A helper `emit_unknown_print_request_help` for the unknown print request diagnostics to make print request collection control flow more obvious.
- Fourth commit renames `PrintKind::{TargetSpec,AllTargetSpecs}` to `PrintKind::{TargetSpecJson,AllTargetSpecsJson}` to better reflect their actual print names, `--print={target-spec-json,all-target-specs-json}`.

r? ``@nnethercote`` (or compiler/reroll)
2025-03-16 21:47:44 -04:00
..
assembly Rollup merge of #137816 - folkertdev:naked-asm-xcoff, r=Noratrieb 2025-03-13 11:28:20 +01:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Auto merge of #137278 - heiseish:101210-extra-codegen-tests, r=scottmcm 2025-03-16 05:17:07 +00:00
codegen-units
coverage
coverage-run-rustdoc
crashes EUV: fix place of deref pattern's interior's scrutinee 2025-03-13 01:01:26 -07:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt Don't drop Rvalue::WrapUnsafeBinder during GVN 2025-03-15 18:10:55 +00:00
pretty Fix HIR param pretty printing some more. 2025-03-14 09:45:41 +11:00
run-make Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
rustdoc Add RTN support to rustdoc 2025-03-15 18:13:27 +00:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json Add RTN support to rustdoc 2025-03-15 18:13:27 +00:00
rustdoc-ui Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
ui Rollup merge of #138552 - jieyouxu:print-request-cleanups, r=Urgau 2025-03-16 21:47:44 -04:00
ui-fulldeps Make opts.maybe_sysroot non-optional 2025-03-12 15:05:24 +00:00
COMPILER_TESTS.md