Skip to content

Compute Upvar.span after typecheck #76005

Closed
@Aaron1011

Description

@Aaron1011

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions