ICE related to if let Some(_) = ...
#78426
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.
Code
I encountered this bug while running tests for this repo under
clang-11
. To do that, I ranOn versions starting with
nightly-2020-09-22
, the compiler produces the three errors aboutif let Some(_)
shown in the Error output section below. I applied the three compiler suggestions, resulting in this diffwhich upon re-running the tests produced the second error shown below.
The original code in part reads
I realize that this isn't a minimal example, but I'm not sure what could be causing this bug, so I don't know how to minimize it.
Meta
I'm using
nightly
because the repo I'm working in requires it.I tested several different versions to try to isolate when the bug appeared. The earliest example I could find was:
rustc --version --verbose
:However, the unmodified code above only generates normal ("external") compiler errors in versions starting with
nightly-2020-09-22
, as far as I can tell. A different message also appears in versions beforenightly-2020-09-08
.Error output
The first error message suggests a fix:
but when I apply that fix, I get:
Note that I have redacted my local username and project name.
Backtrace
The text was updated successfully, but these errors were encountered: