about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/polymorphize.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-19 16:06:43 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-20 21:10:38 +0000
commit60956837cfbf22bd8edd80f57a856e141f7deb8c (patch)
tree4cc50671566d7fb411d8e933348d6785d6bc55cc /compiler/rustc_monomorphize/src/polymorphize.rs
parent96027d945b9d8cae622a2fa4e70d8040be2964f3 (diff)
downloadrust-60956837cfbf22bd8edd80f57a856e141f7deb8c.tar.gz
rust-60956837cfbf22bd8edd80f57a856e141f7deb8c.zip
s/Generator/Coroutine/
Diffstat (limited to 'compiler/rustc_monomorphize/src/polymorphize.rs')
-rw-r--r--compiler/rustc_monomorphize/src/polymorphize.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs
index 6c206a6bac8..33c167930a7 100644
--- a/compiler/rustc_monomorphize/src/polymorphize.rs
+++ b/compiler/rustc_monomorphize/src/polymorphize.rs
@@ -131,7 +131,7 @@ fn mark_used_by_default_parameters<'tcx>(
     unused_parameters: &mut UnusedGenericParams,
 ) {
     match tcx.def_kind(def_id) {
-        DefKind::Closure | DefKind::Generator => {
+        DefKind::Closure | DefKind::Coroutine => {
             for param in &generics.params {
                 debug!(?param, "(closure/gen)");
                 unused_parameters.mark_used(param.index);
@@ -248,7 +248,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
     fn visit_local_decl(&mut self, local: Local, local_decl: &LocalDecl<'tcx>) {
         if local == Local::from_usize(1) {
             let def_kind = self.tcx.def_kind(self.def_id);
-            if matches!(def_kind, DefKind::Closure | DefKind::Generator) {
+            if matches!(def_kind, DefKind::Closure | DefKind::Coroutine) {
                 // Skip visiting the closure/generator that is currently being processed. This only
                 // happens because the first argument to the closure is a reference to itself and
                 // that will call `visit_args`, resulting in each generic parameter captured being
@@ -319,7 +319,7 @@ impl<'a, 'tcx> TypeVisitor<TyCtxt<'tcx>> for MarkUsedGenericParams<'a, 'tcx> {
         }
 
         match *ty.kind() {
-            ty::Closure(def_id, args) | ty::Generator(def_id, args, ..) => {
+            ty::Closure(def_id, args) | ty::Coroutine(def_id, args, ..) => {
                 debug!(?def_id);
                 // Avoid cycle errors with generators.
                 if def_id == self.def_id {