-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustfmt: self.stashed_diagnostics.is_empty()
#121517
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Feb 23, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Feb 23, 2024
cc @nnethercote |
no, I checked, while #121450 is fixed, this one isn't :( |
saethlin
added
A-diagnostics
Area: Messages for errors, warnings, and lints
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Feb 25, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 26, 2024
Move `emit_stashed_diagnostic` call in rustfmt. This call was added to `parse_crate_mod` in rust-lang#121487, to fix a case where a stashed diagnostic wasn't emitted. But there is another path where a stashed diagnostic might fail to be emitted if there's a parse error, if the `build` call in `parse_crate_inner` fails before `parse_crate_mod` is reached. So this commit moves the `emit_stashed_diagnostic` call outwards, from `parse_crate_mod` to `format_project`, just after the `Parser::parse_crate` call. This should be far out enough to catch any parsing errors. Fixes rust-lang#121517. r? `@oli-obk` cc `@ytmimi`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 26, 2024
Rollup merge of rust-lang#121615 - nnethercote:fix-121517, r=oli-obk Move `emit_stashed_diagnostic` call in rustfmt. This call was added to `parse_crate_mod` in rust-lang#121487, to fix a case where a stashed diagnostic wasn't emitted. But there is another path where a stashed diagnostic might fail to be emitted if there's a parse error, if the `build` call in `parse_crate_inner` fails before `parse_crate_mod` is reached. So this commit moves the `emit_stashed_diagnostic` call outwards, from `parse_crate_mod` to `format_project`, just after the `Parser::parse_crate` call. This should be far out enough to catch any parsing errors. Fixes rust-lang#121517. r? `@oli-obk` cc `@ytmimi`
calebcartwright
pushed a commit
to calebcartwright/rust
that referenced
this issue
Jun 22, 2024
This call was added to `parse_crate_mod` in rust-lang#121487, to fix a case where a stashed diagnostic wasn't emitted. But there is another path where a stashed diagnostic might fail to be emitted if there's a parse error, if the `build` call in `parse_crate_inner` fails before `parse_crate_mod` is reached. So this commit moves the `emit_stashed_diagnostic` call outwards, from `parse_crate_mod` to `format_project`, just after the `Parser::parse_crate` call. This should be far out enough to catch any parsing errors. Fixes rust-lang#121517.
calebcartwright
pushed a commit
to calebcartwright/rust
that referenced
this issue
Jun 22, 2024
Move `emit_stashed_diagnostic` call in rustfmt. This call was added to `parse_crate_mod` in rust-lang#121487, to fix a case where a stashed diagnostic wasn't emitted. But there is another path where a stashed diagnostic might fail to be emitted if there's a parse error, if the `build` call in `parse_crate_inner` fails before `parse_crate_mod` is reached. So this commit moves the `emit_stashed_diagnostic` call outwards, from `parse_crate_mod` to `format_project`, just after the `Parser::parse_crate` call. This should be far out enough to catch any parsing errors. Fixes rust-lang#121517. r? `@oli-obk` cc `@ytmimi`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: