-
Notifications
You must be signed in to change notification settings - Fork 13k
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: trimmed_def_paths
called, diagnostics were expected but none were emitted
#135289
Comments
What are the steps to reproduce? cargo check on quinn? |
CI ran |
Thanks you saved me a click 👍.
This is still happening on nightly with Bisection points at #132658 but it's unclear whether that's actually correct yet -- I'll cc the author @estebank for due diligence -- but such issues are sometimes easy so I'll see if I have the time to look into it soon. |
Some context for esteban:
|
I think that we can side-step the issue quickly by removing the call to |
There’s no rush, right? |
I couldn't build a minimal repro to add to the test suite, but #135310 solves the ICE. |
The ICE occurs due to some incorrect behavior in reachability checking of the pattern at |
Always force non-trimming of path in `unreachable_patterns` lint Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
Always force non-trimming of path in `unreachable_patterns` lint Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
Rollup merge of rust-lang#135310 - estebank:issue-135289, r=Nadrieril Always force non-trimming of path in `unreachable_patterns` lint Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289.
Reopening to track beta backport |
Let's keep it open even after backport for |
@djc btw, in the piece of code where I found the ICE and linked earlier: the |
This ICE resisted minimization a lot. Obviously any error is a no no, but it was the same for many warnings as well: any unused variable, useless mut, unused import, etc and the ICE disappears like a frightened tortoise 🐢. Once I discovered that, things became less unpleasant.
#[macro_export]
macro_rules! assert_matches {
( $e:expr , $($pat:pat)|+ ) => {
match $e {
$($pat)|+ => (),
_ => (),
}
};
}
const _A: u64 = 0;
pub fn f() -> u64 {
0
}
fn main() {
fake_matches::assert_matches!(f(), _non_existent);
} I've opened #135833 to add this as a test for now, but the fix should now be easier to clean up. |
Add fixme and test for issue rust-lang#135289 This PR: - adds a test minimizing issue rust-lang#135289 for PR rust-lang#135310 - adds a fixme about the suboptimal fix for the ICE I've verified the test indeed ICEs with 3f2f695 reverted. r? `@estebank`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#132232 (CI: build FreeBSD artifacts on FreeBSD 13.4) - rust-lang#135706 (Move `supertrait_def_ids` into the elaborate module like all other fns) - rust-lang#135750 (Add an example of using `carrying_mul_add` to write wider multiplication) - rust-lang#135793 (Ignore `mermaid.min.js`) - rust-lang#135810 (Add Kobzol on vacation) - rust-lang#135821 (fix OsString::from_encoded_bytes_unchecked description) - rust-lang#135824 (tests: delete `cat-and-grep-sanity-check`) - rust-lang#135833 (Add fixme and test for issue rust-lang#135289) Failed merges: - rust-lang#135816 (Use `structurally_normalize` instead of manual `normalizes-to` goals in alias relate errors) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135833 - lqd:add-ice-test, r=compiler-errors Add fixme and test for issue rust-lang#135289 This PR: - adds a test minimizing issue rust-lang#135289 for PR rust-lang#135310 - adds a fixme about the suboptimal fix for the ICE I've verified the test indeed ICEs with 3f2f695 reverted. r? `@estebank`
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`. This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite. Fix rust-lang#135289. (cherry picked from commit 93a1950)
beta triggered an ICE in Quinn's CI today:
https://github.com/quinn-rs/quinn/actions/runs/12691355015/job/35374229601?pr=2130
Maybe similar/related to:
Maybe a fix that could be backported?
The text was updated successfully, but these errors were encountered: