Borrow checker false positive?

I believe this is the "problem case #3" from the non-lexical lifetimes RFC.

Unfortunately, although it is supposed to work, this is not currently supported:

We originally intended for NLL to accept examples like this: in the RFC, this was called Problem Case #3. However, we had to remove that support because it was simply killing compilation times, and there were also cases where it wasn’t as precise as we wanted.

If it's the same issue, a future version of the compiler may compile it. In the mean time, you just have to work around it. (Also if you're on nightly, try compiling it with -Zpolonius; that turns on an experimental borrow checking mode that should work, although you might not want to do it all the time.)