Skip to content

detect unstable rustc options and suggest the correct syntax #5546

@tanriol

Description

@tanriol

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"`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions