Compute layout with spans for better cycle errors in coroutines#117858
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 13, 2023
Merged
Compute layout with spans for better cycle errors in coroutines#117858bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
compiler-errors
commented
Nov 13, 2023
| let (awaitee_pat, awaitee_pat_hid) = | ||
| self.pat_ident_binding_mode(span, awaitee_ident, hir::BindingAnnotation::MUT); | ||
| let (awaitee_pat, awaitee_pat_hid) = self.pat_ident_binding_mode( | ||
| gen_future_span, |
Contributor
Author
There was a problem hiding this comment.
we use the whole expression span here rather than the span of the .await, when pointing to the local that we use to store the IntoFuture::into_future result. That's because the user probably cares more about the whole async call, not just the fact that the future was awaited.
This matters a lot more when pointing out recursive calls in #117703, but it does make the span a bit better here too.
This comment has been minimized.
This comment has been minimized.
feffe06 to
7994b58
Compare
Contributor
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 13, 2023
Rollup of 5 pull requests Successful merges: - rust-lang#117737 (Remove `-Zkeep-hygiene-data`.) - rust-lang#117830 (Small improvements in object lifetime default code) - rust-lang#117858 (Compute layout with spans for better cycle errors in coroutines) - rust-lang#117863 (Remove some unused stuff from `rustc_index`) - rust-lang#117872 (Cranelift isn't available on non-nightly channels) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 13, 2023
Rollup merge of rust-lang#117858 - compiler-errors:span, r=lcnr Compute layout with spans for better cycle errors in coroutines Split out from rust-lang#117703, this PR at least gives us a nicer span to point at when we hit a cycle error in coroutine layout cycles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out from #117703, this PR at least gives us a nicer span to point at when we hit a cycle error in coroutine layout cycles.