match_default_bindings ICE #46197
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
NLL-fixed-by-NLL
Bugs fixed, but only when NLL is enabled.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
playground link
A bit of history on running into this and trying to make the small reproduction case (Reddit)
The above ICEs on a
cargo build
orcargo test
, but not acargo check
. Changingfn ice
to have a generic argument (such asfn ice<D: Default>
) makescargo check
ICE as well.This seems to have something to do with the
ref
/mut
quality of thestring
binding in thematch
. Qualifyingref mut string
or leaving off both qualifiers works fine (including when the branch has actual code using the&mut String
and isn't just a stub).Backtrace:
The text was updated successfully, but these errors were encountered: