commit | d2db1c1df9bae47259350a3240d69c1412edeb92 | [log] [tgz] |
---|---|---|
author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | Thu Apr 17 17:40:27 2025 +0200 |
committer | GitHub <noreply@github.com> | Thu Apr 17 17:40:27 2025 +0200 |
tree | dfd4a48aee0ed43cbd7804321b09f76ad11e1af5 | |
parent | da43826398d2d5aa7f0f1e2879af2bd80910553c [diff] | |
parent | 8562110e0d8ef293563200d15d466c012e936ff7 [diff] |
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. https://github.com/rust-lang/rust/blob/2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526/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```
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the Rust language trademark policy.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.