Skip to content

rustc panic (debug mode only) #91618

Closed
Closed
@luketpeterson

Description

@luketpeterson

cargo test in the attached project results in a panic in rustc.
cargo test --release works without any problem

Deleting Cargo.lock and the entire target directory did not fix the issue.

Cargo project is here:
cluster_set.strip_down_to_repro_compiler_panic.zip

Unfortunately, it was a bit of a Heisenbug in that further simplification of the code make the panic disappear, but it didn't seem to follow any predictable logic. i.e. removing some functions that shouldn't have any effect made the bug go away, but then putting them back didn't make the bug return.

Meta

Panic occurs on both stable and nightly.

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-apple-darwin
release: 1.57.0
LLVM version: 13.0.0

and

rustc 1.59.0-nightly (efec54529 2021-12-04)
binary: rustc
commit-hash: efec545293b9263be9edfb283a7aa66350b3acbf
commit-date: 2021-12-04
host: x86_64-apple-darwin
release: 1.59.0-nightly
LLVM version: 13.0.0

Error output

Backtrace is here: (stable toolchain)
rustc_panic.txt

Also occurs on nightly:
rustc_panic.nightly.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions