diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 09:02:22 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 21:14:01 +0000 |
| commit | 2d91c76d5dba082f6951eca6f8f694dff90c3607 (patch) | |
| tree | 5b78aa9fd0d69b270368a4a6e0542729cc104aad /compiler/rustc_hir | |
| parent | e96ce20b34789d29e925425da6cf138927b80a79 (diff) | |
| download | rust-2d91c76d5dba082f6951eca6f8f694dff90c3607.tar.gz rust-2d91c76d5dba082f6951eca6f8f694dff90c3607.zip | |
Rename `CoroutineKind::Gen` to `::Coroutine`
Diffstat (limited to 'compiler/rustc_hir')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index cace819c890..f8d55192a37 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1514,14 +1514,14 @@ pub enum CoroutineKind { Async(AsyncCoroutineKind), /// A coroutine literal created via a `yield` inside a closure. - Gen, + Coroutine, } impl fmt::Display for CoroutineKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { CoroutineKind::Async(k) => fmt::Display::fmt(k, f), - CoroutineKind::Gen => f.write_str("coroutine"), + CoroutineKind::Coroutine => f.write_str("coroutine"), } } } @@ -1530,7 +1530,7 @@ impl CoroutineKind { pub fn descr(&self) -> &'static str { match self { CoroutineKind::Async(ask) => ask.descr(), - CoroutineKind::Gen => "coroutine", + CoroutineKind::Coroutine => "coroutine", } } } @@ -2251,7 +2251,7 @@ impl From<CoroutineKind> for YieldSource { fn from(kind: CoroutineKind) -> Self { match kind { // Guess based on the kind of the current coroutine. - CoroutineKind::Gen => Self::Yield, + CoroutineKind::Coroutine => Self::Yield, CoroutineKind::Async(_) => Self::Await { expr: None }, } } |
