diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-19 16:06:43 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 21:10:38 +0000 |
| commit | 60956837cfbf22bd8edd80f57a856e141f7deb8c (patch) | |
| tree | 4cc50671566d7fb411d8e933348d6785d6bc55cc /compiler/rustc_hir_analysis/src/check | |
| parent | 96027d945b9d8cae622a2fa4e70d8040be2964f3 (diff) | |
| download | rust-60956837cfbf22bd8edd80f57a856e141f7deb8c.tar.gz rust-60956837cfbf22bd8edd80f57a856e141f7deb8c.zip | |
s/Generator/Coroutine/
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 1745488dfd3..0b410e26add 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -1394,7 +1394,7 @@ fn opaque_type_cycle_error( self.opaques.push(def); ControlFlow::Continue(()) } - ty::Closure(def_id, ..) | ty::Generator(def_id, ..) => { + ty::Closure(def_id, ..) | ty::Coroutine(def_id, ..) => { self.closures.push(def_id); t.super_visit_with(self) } @@ -1447,7 +1447,7 @@ fn opaque_type_cycle_error( label_match(capture.place.ty(), capture.get_path_span(tcx)); } // Label any generator locals that capture the opaque - if let DefKind::Generator = tcx.def_kind(closure_def_id) + if let DefKind::Coroutine = tcx.def_kind(closure_def_id) && let Some(generator_layout) = tcx.mir_generator_witnesses(closure_def_id) { for interior_ty in &generator_layout.field_tys { @@ -1465,7 +1465,7 @@ fn opaque_type_cycle_error( } pub(super) fn check_generator_obligations(tcx: TyCtxt<'_>, def_id: LocalDefId) { - debug_assert!(matches!(tcx.def_kind(def_id), DefKind::Generator)); + debug_assert!(matches!(tcx.def_kind(def_id), DefKind::Coroutine)); let typeck = tcx.typeck(def_id); let param_env = tcx.param_env(def_id); @@ -1500,7 +1500,7 @@ pub(super) fn check_generator_obligations(tcx: TyCtxt<'_>, def_id: LocalDefId) { ObligationCause::new( field_ty.source_info.span, def_id, - ObligationCauseCode::SizedGeneratorInterior(def_id), + ObligationCauseCode::SizedCoroutineInterior(def_id), ), ); } |
