You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recursive impl-trait type causes compiler stack overflow #43263
because of the recursive return type of foo (X = AndThen<FutureOk<i32>, fn(i32) -> X>). Of course without impl trait I could not have written the type in the first place.
Replace .and_then(foo) with .and_then(|x| foo(x)) fixes it, possibly because the type then becomes AndThen<FutureOk<i32>, [closure]> so the recursive part is separated into the closure type.
Activity
Mark-Simulacrum commentedon Jul 19, 2017
Closing in favor of #39639.
Arnavion commentedon Jul 19, 2017
Ah, I didn't find it because it wasn't tagged with the
A-impl-traitlabel.