Conversation
Modify main message to be more conversational and emit one fewer note.
|
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
|
Thanks. This is clearer. r? @compiler-errors @bors r+ rollup |
|
imo "internal compiler error" and "unexpected panic" are very greppable lines where you can almost be 100% sure if you find this in rustcs output, you found a bug in rustc (and not some proc macro or build.rs script..) Does this change anything about the output of delay_span_bugs or is this only for the error after the stacktrace? |
compiler-errors
left a comment
There was a problem hiding this comment.
Good point @matthiaskrgr, maybe we should emit the same message as a note on the delayed/non-delayed bug cases like:
| let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic"); | ||
| handler.emit_diagnostic(&mut d); | ||
| handler.emit_err(session_diagnostics::Ice); | ||
| } |
There was a problem hiding this comment.
| } | |
| } else { | |
| handler.emit_note(session_diagnostics::Ice); | |
| } |
|
edit: I'm dumb, yes we do. |
| | ^^^^^^^^^ | ||
|
|
||
| error: internal compiler error: unexpected panic | ||
| error: the compiler unexpectedly panicked. this is a bug. |
There was a problem hiding this comment.
Actually, now that I think of it, @matthiaskrgr it should be equally valid to grep for something like "this is a bug" for delayed bug cases like this, rather than "unexpected panic". Is that ok?
There was a problem hiding this comment.
rg'ed in my local cargo cache (3K crates, 81 git checkouts)
internal compiler error:0unexpected panic14this is a bug109the compiler unexpectedly panicked: 0
so "internal compiler error" and "the compiler unexpectedly panicked" gives us the most information because we can almost always be sure, that this is NOT a false positive from for example a format!("internal compiler error") that needed an extra & and sneaked into a diagnostic that way...
"this is a bug" however gives us the least amount of information because a bunch of other crates actually use this in their code.
There was a problem hiding this comment.
well "unexpectedly panicked" should also work as a good grep string then?
|
Tweak ICE message Modify main message to be more conversational and emit one fewer note.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107656 (Bump rust-installer) - rust-lang#107757 (Allow automatically creating vscode `settings.json` with `x setup`) - rust-lang#107769 (Rename `PointerSized` to `PointerLike`) - rust-lang#107770 (rustdoc: use a newline instead of `<br>` to format code headers) - rust-lang#107771 (Tweak ICE message) - rust-lang#107773 (Clearly signal purpose of the yaml template) - rust-lang#107776 (Docs: Fix format of headings in String::reserve) - rust-lang#107779 (Remove astconv usage in diagnostic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup


Modify main message to be more conversational and emit one fewer note.