In #75933, I added code to determine a better upvar span when emitting borrow check errors. This span is stored in ty::UpvarCapture.
Ideally, we would return this span from the upvars_mentioned query - however, the better span depends on typeck (so we can tell if the upvar is inferred to be by-value), and typeck uses upvars_mentioned.
In #75933, I added code to determine a better upvar span when emitting borrow check errors. This span is stored in
ty::UpvarCapture.Ideally, we would return this span from the
upvars_mentionedquery - however, the better span depends on typeck (so we can tell if the upvar is inferred to be by-value), and typeck usesupvars_mentioned.