about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/abi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ty_utils/src/abi.rs')
-rw-r--r--compiler/rustc_ty_utils/src/abi.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs
index b118ddaab2b..f6eec38af7b 100644
--- a/compiler/rustc_ty_utils/src/abi.rs
+++ b/compiler/rustc_ty_utils/src/abi.rs
@@ -97,7 +97,7 @@ fn fn_sig_for_fn_abi<'tcx>(
                 bound_vars,
             )
         }
-        ty::Generator(did, args, _) => {
+        ty::Coroutine(did, args, _) => {
             let sig = args.as_generator().poly_sig();
 
             let bound_vars = tcx.mk_bound_variable_kinds_from_iter(
@@ -117,7 +117,7 @@ fn fn_sig_for_fn_abi<'tcx>(
 
             let sig = sig.skip_binder();
             // The `FnSig` and the `ret_ty` here is for a generators main
-            // `Generator::resume(...) -> GeneratorState` function in case we
+            // `Coroutine::resume(...) -> CoroutineState` function in case we
             // have an ordinary generator, or the `Future::poll(...) -> Poll`
             // function in case this is a special generator backing an async construct.
             let (resume_ty, ret_ty) = if tcx.generator_is_async(did) {
@@ -143,8 +143,8 @@ fn fn_sig_for_fn_abi<'tcx>(
 
                 (context_mut_ref, ret_ty)
             } else {
-                // The signature should be `Generator::resume(_, Resume) -> GeneratorState<Yield, Return>`
-                let state_did = tcx.require_lang_item(LangItem::GeneratorState, None);
+                // The signature should be `Coroutine::resume(_, Resume) -> CoroutineState<Yield, Return>`
+                let state_did = tcx.require_lang_item(LangItem::CoroutineState, None);
                 let state_adt_ref = tcx.adt_def(state_did);
                 let state_args = tcx.mk_args(&[sig.yield_ty.into(), sig.return_ty.into()]);
                 let ret_ty = Ty::new_adt(tcx, state_adt_ref, state_args);