-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Suggest use of --print target-list
when target is not found.
#35129
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This needs a more careful wording. --print target-list does not print all targets that would be accepted in any given environment. There’s custom json targets, What this should be saying instead is:
Better off you could make the note/help an actual note:
For that you’ll need to convert this code to use the DiagnosticBuilder. Namely the code would end up looking something like
|
If given target could not be found suggest using `--print target-list`. Previously, error has been reported as: $ rustc --target x86-unknown-linux-gnu error: Error loading target specification: Could not find specification for target "x86-unknown-linux-gnu" After changes it looks as follows: rustc --target x86-unknown-linux-gnu error: Error loading target specification: Could not find specification for target "x86-unknown-linux-gnu" help: Use `--print target-list` for a list of built-in targets
Thanks @nagisa. I updated the message and moved it to help sub-section. Though, I had to manually panic with |
r=me |
@bors r=nagisa |
📌 Commit 443f1ca has been approved by |
Suggest use of `--print target-list` when target is not found. If given target could not be found suggest using `--print target-list`. Previously, error has been reported as: $ rustc --target 86-unknown-linux-gnu error: Error loading target specification: Could not find specification for target "86-unknown-linux-gnu" After changes it looks as follows: $ rustc --target 86-unknown-linux-gnu error: Error loading target specification: Could not find specification for target "x86-unknown-linux-gnu". Use `--print target-list` for a list of supported targets
If given target could not be found suggest using
--print target-list
.Previously, error has been reported as:
$ rustc --target 86-unknown-linux-gnu
error: Error loading target specification: Could not find specification for target "86-unknown-linux-gnu"
After changes it looks as follows:
$ rustc --target 86-unknown-linux-gnu
error: Error loading target specification: Could not find specification for target "x86-unknown-linux-gnu". Use
--print target-list
for a list of supported targets