Spurious reborrowing errors when returning lifetimes referencing mutable borrows from inside loops #113322
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: It to compile successfully, like it does without the loop:
Instead, this happened:
Meta
rustc --version --verbose
:Also repros on nightly: https://godbolt.org/z/hEdjnz5oE
The text was updated successfully, but these errors were encountered: