-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
This compiles as expected:
#![feature(nll)]
fn foo() -> impl Copy { || bar(); }
fn bar() -> impl Copy { || foo(); }
This, however, does not, since today (suspecting it's #53542):
#![feature(nll)]
fn foo() -> impl Copy { || foo(); }
fn bar() -> impl Copy { || bar(); }
Each inner closure, because it calls its parent function, causes this ICE: "equate_inputs_and_outputs: impl std::marker::Copy==impl std::marker::Copy
failed with NoSolution
".
(you only need one of foo
or bar
, but I left both in for contrast with the first example)
I suspect each impl Copy
is instantiated in two different ways, causing inconsistencies.
Originally found through a daily Travis CI build job.
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) ❄️