-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 layout with spans for better cycle errors in coroutines #117858
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
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.
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.