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_trait_selection/src/solve/trait_goals.rs | |
| parent | 96027d945b9d8cae622a2fa4e70d8040be2964f3 (diff) | |
| download | rust-60956837cfbf22bd8edd80f57a856e141f7deb8c.tar.gz rust-60956837cfbf22bd8edd80f57a856e141f7deb8c.zip | |
s/Generator/Coroutine/
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/trait_goals.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/trait_goals.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs index d87e05ad02f..3aac24f82e7 100644 --- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs @@ -319,11 +319,11 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> { return Err(NoSolution); } - let ty::Generator(def_id, _, _) = *goal.predicate.self_ty().kind() else { + let ty::Coroutine(def_id, _, _) = *goal.predicate.self_ty().kind() else { return Err(NoSolution); }; - // Generators are not futures unless they come from `async` desugaring + // Coroutines are not futures unless they come from `async` desugaring let tcx = ecx.tcx(); if !tcx.generator_is_async(def_id) { return Err(NoSolution); @@ -344,7 +344,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> { } let self_ty = goal.predicate.self_ty(); - let ty::Generator(def_id, args, _) = *self_ty.kind() else { + let ty::Coroutine(def_id, args, _) = *self_ty.kind() else { return Err(NoSolution); }; @@ -844,10 +844,10 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { ty::Infer(_) | ty::Bound(_, _) => bug!("unexpected type `{self_ty}`"), - // Generators have one special built-in candidate, `Unpin`, which + // Coroutines have one special built-in candidate, `Unpin`, which // takes precedence over the structural auto trait candidate being // assembled. - ty::Generator(_, _, movability) + ty::Coroutine(_, _, movability) if Some(goal.predicate.def_id()) == self.tcx().lang_items().unpin_trait() => { match movability { @@ -879,8 +879,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { | ty::FnDef(_, _) | ty::FnPtr(_) | ty::Closure(_, _) - | ty::Generator(_, _, _) - | ty::GeneratorWitness(..) + | ty::Coroutine(_, _, _) + | ty::CoroutineWitness(..) | ty::Never | ty::Tuple(_) | ty::Adt(_, _) |
