-
-
Notifications
You must be signed in to change notification settings - Fork 16k
NLL type-checking ICEs on closure recursing on impl Trait-returning enclosing function. #54593
Copy link
Copy link
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
This compiles as expected:
This, however, does not, since today (suspecting it's #53542):
Each inner closure, because it calls its parent function, causes this ICE: "equate_inputs_and_outputs:
impl std::marker::Copy==impl std::marker::Copyfailed withNoSolution".(you only need one of
fooorbar, but I left both in for contrast with the first example)I suspect each
impl Copyis instantiated in two different ways, causing inconsistencies.Originally found through a daily Travis CI build job.