Incompatible lifetimes - mutable references in an async loop

Aha, thank you for clarifying that for me. Indeed, the following compiles just fine:

I also attempted a solution using type_alias_impl_trait, but bumped into Unification fails when type alias impl trait is used in non-return position · Issue #64445 · rust-lang/rust · GitHub, I think (playground).

This is the second time you've pulled me out of a fight with the compiler, so thanks again!

1 Like