-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove broken redundant backtrace hint #47679
Remove broken redundant backtrace hint #47679
Conversation
When the compiler driver panics it attempts to show a hint about using `RUST_BACKTRACE`. However, the logic is currently reversed to the hint is only shown if `RUST_BACKTRACE` is *already* set: ```shell > RUST_BACKTRACE=1 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. > RUST_BACKTRACE=0 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` As the `panic` itself already has a working `RUST_BACKTRACE` hint just remove the broken duplicate hint entirely.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (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. |
@bors r+ rollup |
📌 Commit 5de8e04 has been approved by |
…hint, r=estebank Remove broken redundant backtrace hint When the compiler driver panics it attempts to show a hint about using `RUST_BACKTRACE`. However, the logic is currently reversed to the hint is only shown if `RUST_BACKTRACE` is **already** set: ```shell > RUST_BACKTRACE=1 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. > RUST_BACKTRACE=0 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` As the `panic` itself already has a working `RUST_BACKTRACE` hint just remove the broken duplicate hint entirely.
…hint, r=estebank Remove broken redundant backtrace hint When the compiler driver panics it attempts to show a hint about using `RUST_BACKTRACE`. However, the logic is currently reversed to the hint is only shown if `RUST_BACKTRACE` is **already** set: ```shell > RUST_BACKTRACE=1 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. > RUST_BACKTRACE=0 rustc /dev/null --crate-type proc-macro error: internal compiler error: unexpected panic ... thread 'rustc' panicked at 'attempt to subtract with overflow', librustc_errors/emitter.rs:287:49 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` As the `panic` itself already has a working `RUST_BACKTRACE` hint just remove the broken duplicate hint entirely.
When the compiler driver panics it attempts to show a hint about using
RUST_BACKTRACE
. However, the logic is currently reversed to the hint is only shown ifRUST_BACKTRACE
is already set:As the
panic
itself already has a workingRUST_BACKTRACE
hint just remove the broken duplicate hint entirely.