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.
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.