Closed
Description
E.g. for #70942, instead of:
error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug.
We could print something more like
error: internal compiler error: unexpected panic while const-evaluating `main::{{constant}}#0` ... (full query stack hidden, use `RUST_BACKTRACE=1` to enable) note: the compiler unexpectedly panicked. this is a bug.
(not super sure about the RUST_BACKTRACE=1
suggestion message)
This (and the query stack more generally) should allow quicker diagnosis, and there should be no cost to just having this on by default for ICEs.
It could also be useful to users, as they could use it to figure out roughly where in their code they're triggering the ICE (similar to the Span
from a span_bug!
), to work around the ICE in the meanwhile or know which error to fix (in case it's a side-effect of an error) to get rid of the ICE.
cc @rust-lang/compiler @rust-lang/wg-diagnostics
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.Working group: Diagnostics