Rollup merge of #118762 - compiler-errors:gen-nits, r=eholk

Some more minor `async gen`-related nits

Tiny tweaks found after `async gen` pr landed

r? eholk
This commit is contained in:
Jubilee 2023-12-09 00:48:11 -08:00 committed by GitHub
commit 402cfb17f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 34 deletions

View file

@ -3144,10 +3144,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let what = match self.tcx.coroutine_kind(coroutine_def_id) {
None
| Some(hir::CoroutineKind::Coroutine)
| Some(hir::CoroutineKind::Gen(_))
// FIXME(gen_blocks): This could be yield or await...
| Some(hir::CoroutineKind::AsyncGen(_)) => "yield",
| Some(hir::CoroutineKind::Gen(_)) => "yield",
Some(hir::CoroutineKind::Async(..)) => "await",
Some(hir::CoroutineKind::AsyncGen(_)) => "yield`/`await",
};
err.note(format!(
"all values live across `{what}` must have a statically known size"