-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc --crate-type flag should display valid values #70183
Labels
A-CLI
Area: Command-line interface (CLI) to the compiler
A-diagnostics
Area: Messages for errors, warnings, and lints
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
rust/compiler/rustc_session/src/config.rs Lines 2672 to 2681 in a7fc76a
|
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 25, 2024
…s, r=jieyouxu Display valid crate types in error message for --crate-type flag This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options. ### Before  ### After  I based the implementation on `OutputType::shorthands_display` Closes rust-lang#70183
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Jan 7, 2025
…ues, r=jieyouxu Display valid crate types in error message for --crate-type flag This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options. ### Before  ### After  I based the implementation on `OutputType::shorthands_display` Closes rust-lang#70183
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Mar 14, 2025
…ues, r=jieyouxu Display valid crate types in error message for --crate-type flag This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options. ### Before  ### After  I based the implementation on `OutputType::shorthands_display` Closes rust-lang#70183
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 14, 2025
Rollup merge of rust-lang#134720 - malezjaa:feat/crate-type-valid-values, r=jieyouxu Display valid crate types in error message for --crate-type flag This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options. ### Before  ### After  I based the implementation on `OutputType::shorthands_display` Closes rust-lang#70183
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-CLI
Area: Command-line interface (CLI) to the compiler
A-diagnostics
Area: Messages for errors, warnings, and lints
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hello,
When we provide wrong value for the
--emit
flag, we will get a list of valid values. This is not the case for--crate-type
flag, which should also display valid values.The
--emit
example:The
--crate-type
example:Versions:
I have also tested this on rustc 1.42.0 and it is the same.
The text was updated successfully, but these errors were encountered: