-
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
Drop tracking error message regression in issue-70935-complex-spans.rs
#97332
Comments
@rustbot claim |
Noticed an existing weirdness with one of the diagnostics - this should point to rust/src/test/ui/async-await/issue-70935-complex-spans.stderr Lines 11 to 17 in ec21d7e
|
#98259 makes this significantly better but not the same as without -Zdrop-tracking. Not sure whether that's sufficient, or whether I should keep working on this. I'm not sure it's possible to make them identical without radical changes to how async-await diagnostics work: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/josh.20rambles.20about.20drop.20tracking.20.2397332/near/286660618 |
…=estebank Greatly improve error reporting for futures and generators in `note_obligation_cause_code` Most futures don't go through this code path, because they're caught by `maybe_note_obligation_cause_for_async_await`. But all generators do, and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses. At some point, we may want to consider unifying this with the code for `maybe_note_async_await`, so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points. But both functions are quite complicated, and it's not clear to me how to combine them; this seems like a good incremental improvement. Helps with rust-lang#97332. r? `@estebank` cc `@eholk` `@compiler-errors`
…=estebank Greatly improve error reporting for futures and generators in `note_obligation_cause_code` Most futures don't go through this code path, because they're caught by `maybe_note_obligation_cause_for_async_await`. But all generators do, and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses. At some point, we may want to consider unifying this with the code for `maybe_note_async_await`, so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points. But both functions are quite complicated, and it's not clear to me how to combine them; this seems like a good incremental improvement. Helps with rust-lang#97332. r? ``@estebank`` cc ``@eholk`` ``@compiler-errors``
I'm happy with how this error message looks after the recent changes, so I'll go ahead and mark it as closed. |
With
-Zdrop-tracking
enabled,issue-70935-complex-spans.rs
gives the following stderr output:Without
-Zdrop-tracking
, we get the following error message:The old message seems much better, so it'd be good to match the behavior with drop tracking.
The text was updated successfully, but these errors were encountered: