Skip to content

internal compiler error: unexpected panic with clippy 0.1.58 #8340

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
michidk opened this issue Jan 23, 2022 · 3 comments
Closed

internal compiler error: unexpected panic with clippy 0.1.58 #8340

michidk opened this issue Jan 23, 2022 · 3 comments

Comments

@michidk
Copy link

michidk commented Jan 23, 2022

After renaming my struct DocumentParser to OffDocument (https://github.com/michidk/off-rs/blob/clippy_err/src/parser/mod.rs#L19) with vscode and rust-analyzer, clippy panics.

Edit: Happens with every new name.

PS C:\Users\michi\development\private\off-rs> cargo clippy
    Checking off-rs v0.1.0 (C:\Users\michi\development\private\off-rs)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40\compiler\rustc_hir\src\definitions.rs:452:14
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.58 (02072b48 2022-01-11)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack

How to replicate

Clone https://github.com/michidk/off-rs/tree/clippy_err (clippy_errr branch)
Run cargo clippy (version: clippy 0.1.58 (02072b48 2022-01-1)

@michidk
Copy link
Author

michidk commented Jan 23, 2022

Actually, I am not sure if this is an issue with just clippy, since cargo build also panics:

PS C:\Users\michi\development\private\off-rs> cargo build
   Compiling off-rs v0.1.0 (C:\Users\michi\development\private\off-rs)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40\compiler\rustc_hir\src\definitions.rs:452:14
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.58.0 (02072b482 2022-01-11) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `off-rs`

@giraffate
Copy link
Contributor

Thanks for the report!

It's a duplicate of rust-lang/rust#90682.

@giraffate
Copy link
Contributor

It's the rustc issue, so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants