about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/thir/cx/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_mir_build/src/thir/cx/mod.rs')
-rw-r--r--compiler/rustc_mir_build/src/thir/cx/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/thir/cx/mod.rs b/compiler/rustc_mir_build/src/thir/cx/mod.rs
index d98cc76adfb..8bc4cbb9532 100644
--- a/compiler/rustc_mir_build/src/thir/cx/mod.rs
+++ b/compiler/rustc_mir_build/src/thir/cx/mod.rs
@@ -37,7 +37,7 @@ pub(crate) fn thir_body(
 
         // The resume argument may be missing, in that case we need to provide it here.
         // It will always be `()` in this case.
-        if tcx.def_kind(owner_def) == DefKind::Generator && body.params.is_empty() {
+        if tcx.def_kind(owner_def) == DefKind::Coroutine && body.params.is_empty() {
             cx.thir.params.push(Param {
                 ty: Ty::new_unit(tcx),
                 pat: None,
@@ -148,7 +148,7 @@ impl<'tcx> Cx<'tcx> {
 
                 Some(env_param)
             }
-            DefKind::Generator => {
+            DefKind::Coroutine => {
                 let gen_ty = self.typeck_results.node_type(owner_id);
                 let gen_param =
                     Param { ty: gen_ty, pat: None, ty_span: None, self_kind: None, hir_id: None };