Skip to content
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

detect unstable rustc options and suggest the correct syntax #5546

Closed
tanriol opened this issue May 18, 2018 · 1 comment · Fixed by #12857
Closed

detect unstable rustc options and suggest the correct syntax #5546

tanriol opened this issue May 18, 2018 · 1 comment · Fixed by #12857
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@tanriol
Copy link

tanriol commented May 18, 2018

There are cases when a user is suggested to use an unstable rustc option (and the suggestion for external-macro-backtrace is even in the rustc output). However, if a user tries to add this option to his cargo command line, the error message just says that this flag is unknown.

It would be a good idea to output something like

note: option `external-macro-backtrace` is a `rustc` option, not a `cargo` one
note: to use it, prefix the `cargo` command line with `RUSTFLAGS="-Z external-macro-backtrace"`
@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 18, 2018
@ehuss ehuss added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Sep 23, 2019
@PoignardAzur
Copy link

I'd really like this feature too. I've been burned multiple times by this.

epage added a commit to epage/cargo that referenced this issue Oct 19, 2023
In rust-lang#5546, they suggested we have a list of them but that would be hard
to keep up and works well enough to just always mention it.

Fixes rust-lang#5546
bors added a commit that referenced this issue Oct 19, 2023
fix(cli): Provide next steps for bad -Z flag

In #5546, they suggested we have a list of them but that would be hard to keep up and works well enough to just always mention it.

Fixes #5546
@bors bors closed this as completed in 51aeeb0 Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants