ICE with Unreachable patterns and Incremental compilation #97517
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Minimized Code
Summary
I got this ICE when compiling one of the UI test files ( slice-pattern-const.rs ) as a normal cargo project.
How can that be? Well, compiler flags are different than in the test suit. The culprit turns out to be incremental compilation.
The following ICEs:
rustc main.rs -C incremental=true
cargo check
The following works as expected:
rustc main.rs
cargo build --release
.
There is a fun bonus bug in here:
cargo clean ; cargo check
b"" => (),
cargo check
cargo check
doesn't ICE anymore, on the original code.Affected versions
The bug report is made with
rustc 1.63.0-nightly (1fede1753 2022-05-28)
, but this ICE seems to be very old.Output of
cargo bisect-rustc --preserve --prompt --end=2021-09-11 --start=2020-01-01
:Error output
The text was updated successfully, but these errors were encountered: