diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-26 22:43:11 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-12-28 16:35:01 +0000 |
| commit | e24da8ea197b4b6724aaf7b5a5a2de64bb3c7445 (patch) | |
| tree | 3c6d6e8b5b1f6adb15869238d11665fa48dab0fa /compiler/rustc_trait_selection/src/solve | |
| parent | 15ccf2e7bda95b5dd28cb98d5fee79592fb7b854 (diff) | |
Movability doesn't need to be a query anymore
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/trait_goals.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs index 4bf90505166..274a75a125c 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs @@ -193,7 +193,7 @@ pub(in crate::solve) fn instantiate_constituent_tys_for_copy_clone_trait<'tcx>( ty::Closure(_, args) => Ok(vec![args.as_closure().tupled_upvars_ty()]), - ty::Coroutine(def_id, args) => match ecx.tcx().movability(def_id) { + ty::Coroutine(def_id, args) => match ecx.tcx().coroutine_movability(def_id) { Movability::Static => Err(NoSolution), Movability::Movable => { if ecx.tcx().features().coroutine_clone { diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs index 00ceb44dd2e..be079275684 100644 --- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs @@ -930,7 +930,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { ty::Coroutine(def_id, _) if Some(goal.predicate.def_id()) == self.tcx().lang_items().unpin_trait() => { - match self.tcx().movability(def_id) { + match self.tcx().coroutine_movability(def_id) { Movability::Static => Some(Err(NoSolution)), Movability::Movable => { Some(self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)) |
