rust/compiler/rustc_session/src
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
..
config Add unstable foo::bar extern command line arguments 2025-04-15 13:04:50 -07:00
code_stats.rs Make CodeStat's type sizes a public field 2025-04-16 02:10:53 +02:00
config.rs Rollup merge of #139850 - xizheyin:issue-138698, r=jieyouxu 2025-04-17 17:40:27 +02:00
cstore.rs Update comments 2024-12-19 15:30:32 +00:00
errors.rs Auto merge of #138947 - madsmtm:refactor-apple-versions, r=Noratrieb 2025-04-06 10:16:28 +00:00
filesearch.rs Cache current_dll_path output 2025-03-21 12:46:24 +00:00
lib.rs Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
options.rs Rollup merge of #139647 - eholk:package-namespace, r=fmease 2025-04-16 13:45:27 +02:00
output.rs Auto merge of #138906 - thaliaarchi:unsupported-test-exe, r=bjorn3 2025-04-15 16:05:15 +00:00
parse.rs Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
search_paths.rs Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
session.rs Stabilize -Zdwarf-version as -Cdwarf-version 2025-04-14 21:26:41 -05:00
utils.rs use slice::contains where applicable 2025-03-28 12:21:21 +00:00