summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-12-09 00:48:11 -0800
committerGitHub <noreply@github.com>2023-12-09 00:48:11 -0800
commit402cfb17f76e54392b2e12ebfe89bf5bbae08228 (patch)
tree541fac9fc79fa89c230cc536686904d0a69c1de3 /compiler/rustc_trait_selection/src
parentad9114125dac32747570c8ba37abaab557030003 (diff)
parent384a49edd0cddba275e6be73acbb9a7c37ec03b2 (diff)
downloadrust-402cfb17f76e54392b2e12ebfe89bf5bbae08228.tar.gz
rust-402cfb17f76e54392b2e12ebfe89bf5bbae08228.zip
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
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 7bf37cf7980..95ffd07e397 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -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"