Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute Upvar.span after typecheck #76005

Closed
Aaron1011 opened this issue Aug 27, 2020 · 1 comment · Fixed by #84358
Closed

Compute Upvar.span after typecheck #76005

Aaron1011 opened this issue Aug 27, 2020 · 1 comment · Fixed by #84358
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Aaron1011
Copy link
Member

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.

@Aaron1011 Aaron1011 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 27, 2020
@arora-aman
Copy link
Member

arora-aman commented Sep 9, 2020

Will hopefully be fixed by rust-lang/project-rfc-2229#7

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 2, 2021
…_rebased, r=nikomatsakis

Update closure capture error logging for disjoint captures for disjoint captures

Improved error logging when `#![feature(capture_disjoint_fields)]` is used.

Closes rust-lang/project-rfc-2229#8
Closes rust-lang/project-rfc-2229#36
Closes rust-lang/project-rfc-2229#39
Closes rust-lang#76005
@bors bors closed this as completed in a00edce May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants