MIR type-checking ICE ("is not a subtype of") from lifetime parameter in scope of AnonConst. #70773
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
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.
This example was found in #70452 (where it does not require
#![feature(const_generics)]
, the only reason I have it here is to get around #43408) (playground):The ICE is:
The ICE goes away when the lifetime parameter (
'a
) is removed, or when replaced with a type parameter, so my guess is that the MIR type-checker triggers an attempt at normalization (otherwise it would also ICE with a type parameter) but has lifetime inference variables in theSubsts
of theConstKind::Unevaluated
, and that prevents the normalization.It really shouldn't, I thought we both erased lifetimes and fell back on fully polymorphic evaluation (which should also succeed here), if there are any inference variables.
The text was updated successfully, but these errors were encountered: