about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-06-23 14:39:06 -0700
committerGitHub <noreply@github.com>2022-06-23 14:39:06 -0700
commit413e350f87fafeea3da13fc98337c632c4cfcd70 (patch)
treea94144d354069b6619cf4dc4c3f099f2f3db01e9 /src/librustdoc/html/static/js/source-script.js
parent49bcc7057457f758d18cbd22aa2b8a251ee6510c (diff)
parent1deca0425db3e74a61cb732e729c0777904e549c (diff)
downloadrust-413e350f87fafeea3da13fc98337c632c4cfcd70.tar.gz
rust-413e350f87fafeea3da13fc98337c632c4cfcd70.zip
Rollup merge of #98259 - jyn514:improve-obligation-errors, r=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 https://github.com/rust-lang/rust/issues/97332.

r? ``@estebank`` cc ``@eholk`` ``@compiler-errors``
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
0 files changed, 0 insertions, 0 deletions