Skip to content

ICE assertion failed: !suggestion.is_empty() #8911

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

Closed
steffahn opened this issue May 29, 2022 · 1 comment · Fixed by #8912
Closed

ICE assertion failed: !suggestion.is_empty() #8911

steffahn opened this issue May 29, 2022 · 1 comment · Fixed by #8912
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@steffahn
Copy link
Member

steffahn commented May 29, 2022

Summary

#[allow(unused)]
#[rustfmt::skip]
fn f() {
    let x: ();
    match todo!() {
        _ if {x = (); false} => panic!(),
        _ => panic!(),
    }

    todo!()
}

(Playground)

Version

Clippy version: clippy 0.1.63 (1fede17 2022-05-28)

Error output

Checking playground v0.0.1 (/playground)
thread 'rustc' panicked at 'assertion failed: !suggestion.is_empty()', /rustc/1fede1753c33f4ce0660ad9b8edbd618d9733daf/compiler/rustc_errors/src/diagnostic.rs:552:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.63 (1fede17 2022-05-28)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `playground`
@steffahn steffahn added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels May 29, 2022
@Alexendoo
Copy link
Member

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants