rust/compiler/rustc_session
Matthias Krüger d2db1c1df9
Rollup merge of #139850 - xizheyin:issue-138698, r=jieyouxu
Hide unstable print kinds within emit_unknown_print_request_help in stable channel

Fixes #138698

We need to get the channel from `matches`. However, since `matches`(Line 1169) is constructed after `rustc_optgroups` (Line1165, where `RustcOptGroup::value_hint` is generated, i.e. what `rustc --print print` prints), I've left it unchanged here for now.

2da29dbe8f/compiler/rustc_driver_impl/src/lib.rs (L1161-L1169)

There is actually a way to manually parse the `--crate-name` parameter, but I'm afraid that's an unorthodox practice. So I conservatively just modified `emit_unknown_print_request_help` to print different parameters depending on whether they are nightly or not when passing the error parameter.

r? ```@jieyouxu```
2025-04-17 17:40:27 +02:00
..
src Rollup merge of #139850 - xizheyin:issue-138698, r=jieyouxu 2025-04-17 17:40:27 +02:00
Cargo.toml Prepend temp files with a string per invocation of rustc 2025-04-07 20:48:40 +00:00
messages.ftl Auto merge of #138947 - madsmtm:refactor-apple-versions, r=Noratrieb 2025-04-06 10:16:28 +00:00