rust/tests
Michael Goulet 21cdebcf4e
Rollup merge of #138641 - jieyouxu:print-supported-crate-types, r=Urgau
Add unstable `--print=supported-crate-types` option

MCP: https://github.com/rust-lang/compiler-team/issues/836
Tracking issue: https://github.com/rust-lang/rust/issues/138640

### Test coverage

Two tests:

1. `tests/ui/print-request/stability.rs` to check that `--print=supported-crate-types` is `-Zunstable-options`-gated
2. `tests/ui/print-request/supported-crate-types.rs` is added as a basic smoke test. Observe that the compiler stdout corresponds to the below *Example output* section (e.g. `proc-macro` is unsupported on `wasm32-unknown-unknown` currently).

### Example output

<details>
<summary>For `x86_64-unknown-linux-gnu`</summary>

Notice the presence of `{c,}dylib` and `proc-macro`:
```
bin
cdylib
dylib
lib
proc-macro
rlib
staticlib
```
</details>

<details>
<summary>For `wasm32-unknown-unknown`</summary>

Notice the absence of `dylib` and `proc-macro`:
```
bin
cdylib
lib
rlib
staticlib
```
</details>

<details>
<summary>For `x86_64-unknown-linux-musl`</summary>

Notice the absence of `{c,}dylib` but presence of `proc-macro`:
```
bin
lib
proc-macro
rlib
staticlib
```
</details>

### Documentation

I added an entry in the unstable book's print request section to document this `supported-crate-types` print request.

### Unresolved questions

- [ ] (Name bikeshedding) is `supported-crate-types` a good name for the print request? I'm inclined to say it's good enough for an unstable print request, but may be worth revisiting at stabilization time.

### Stability

This print request being added is *unstable* in this PR. A separate stabilization PR following the usual compiler flag stabilization procedure should be filed for stabilization after some baking time.

### Review remarks

Best reviewed commit-by-commit.

r? compiler
2025-03-23 14:59:33 -04:00
..
assembly Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Use explicit cpu in some asm and codegen tests. 2025-03-19 19:45:46 +01:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Add some more cases to tests/coverage/holes.rs 2025-02-19 13:56:20 +11:00
coverage-run-rustdoc
crashes Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obk 2025-03-22 06:55:52 +00: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 Rollup merge of #138545 - scottmcm:more-option-tests, r=Mark-Simulacrum 2025-03-23 14:59:32 -04:00
pretty Rollup merge of #138627 - EnzymeAD:autodiff-cleanups, r=oli-obk 2025-03-21 15:48:55 +01:00
run-make Rebless tests with changed help due to new print request option 2025-03-23 19:08:55 +08: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 Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json rustdoc: Use own logic to print #[repr(..)] attributes in JSON output. 2025-03-22 18:47:12 +00:00
rustdoc-ui Rollup merge of #138293 - clubby789:doc-cfg-gate, r=GuillaumeGomez 2025-03-23 14:59:30 -04:00
ui Rollup merge of #138641 - jieyouxu:print-supported-crate-types, r=Urgau 2025-03-23 14:59:33 -04:00
ui-fulldeps Rollup merge of #138536 - makai410:mut-mir-visitor, r=celinval 2025-03-22 11:59:17 +01:00
COMPILER_TESTS.md