-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ICE: assertion failed: self.stashed_diagnostics.is_empty()
#12364
Comments
I'm guessing the |
@y21 That's right, it'll probably need an Having said that, I'm thinking about changing the whole approach from rust-lang/rust#121206 because my changes are causing problems I didn't anticipate, which would make that quick fix unnecessary. If you need this fixed ASAP I can do the quick fix (or you could do it if you like). Otherwise, waiting for a more comprehensive fix might be easier. What do you think? |
I will probably get to the comprehensive fix today, so it's probably best to wait for that. |
Nice, it's probably better to wait for the proper, more comprehensive fix then, I agree. Thanks! |
Some questions:
Thanks. |
Not sure I understand. It was caught by a user of clippy and not by clippy itself or in rust's CI because we presumably had no such test or code that excercised that code path, but esp-hal did. |
Ah, that makes sense. I misinterpreted the name |
Any suggestions on how I should write a test for this to add to clippy would be welcome :) |
I removed it in rust-lang#121206 because I thought thought it wasn't necessary. But then I had to add an `emit_stashed_diagnostics` call elsewhere in rustfmt to avoid the assertion failure (which took two attempts to get right, rust-lang#121487 and rust-lang#121615), and now there's an assertion failure in clippy as well (rust-lang/rust-clippy#12364). So this commit just reinstates the call in `DiagCtxtInner::drop`. It also reverts the rustfmt changes from rust-lang#121487 and rust-lang#121615, though it keeps the tests added for those PRs.
The best way is to create a test file in You then might have to run |
This should be fixed by rust-lang/rust#121669. |
Awesome, thank you @nnethercote for the fix! |
I removed it in rust-lang#121206 because I thought thought it wasn't necessary. But then I had to add an `emit_stashed_diagnostics` call elsewhere in rustfmt to avoid the assertion failure (which took two attempts to get right, rust-lang#121487 and rust-lang#121615), and now there's an assertion failure in clippy as well (rust-lang/rust-clippy#12364). So this commit just reinstates the call in `DiagCtxtInner::drop`. It also reverts the rustfmt changes from rust-lang#121487 and rust-lang#121615, though it keeps the tests added for those PRs.
rust-lang/rust#121669 just merged, and will make it into the next Nightly, in the next 24 hours or so. Please close this PR once you have confirmed the problem is fixed, or let us know if it's not fixed. |
I removed it in rust-lang#121206 because I thought thought it wasn't necessary. But then I had to add an `emit_stashed_diagnostics` call elsewhere in rustfmt to avoid the assertion failure (which took two attempts to get right, rust-lang#121487 and rust-lang#121615), and now there's an assertion failure in clippy as well (rust-lang/rust-clippy#12364). So this commit just reinstates the call in `DiagCtxtInner::drop`. It also reverts the rustfmt changes from rust-lang#121487 and rust-lang#121615, though it keeps the tests added for those PRs.
Looks like our clippy CI job is operational again, so things appear to be fixed. Thank you again for resolving this! |
I removed it in #121206 because I thought thought it wasn't necessary. But then I had to add an `emit_stashed_diagnostics` call elsewhere in rustfmt to avoid the assertion failure (which took two attempts to get right, #121487 and #121615), and now there's an assertion failure in clippy as well (rust-lang/rust-clippy#12364). So this commit just reinstates the call in `DiagCtxtInner::drop`. It also reverts the rustfmt changes from #121487 and #121615, though it keeps the tests added for those PRs.
Summary
We run
clippy
checks as part of our CI workflow in the esp-hal project. We have been using thenightly
release channel for various reasons, and this has largely not been a problem over the last couple of years.As of yesterday (2024-02-26) this ICE has reared its head. I had expected this to be resolved with a new nightly release, as has usually been the case in the rare cases we encounter problems like this, however we are still experiencing this ICE.
The most recent workflow run (as of time of writing) can be seen failing here:
https://github.com/esp-rs/esp-hal/actions/runs/8066109592/job/22033416529
I apologize, I am unable to provide a minimal verifiable example at this time; if my schedule clears up this week perhaps I can look into it, but can't make any promises.
Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: