Movability doesn't need to be a query anymore

This commit is contained in:
Michael Goulet
2023-12-26 22:43:11 +00:00
parent 15ccf2e7bd
commit e24da8ea19
21 changed files with 29 additions and 56 deletions

View File

@@ -567,7 +567,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
ty::Coroutine(coroutine_def_id, _)
if self.tcx().lang_items().unpin_trait() == Some(def_id) =>
{
match self.tcx().movability(coroutine_def_id) {
match self.tcx().coroutine_movability(coroutine_def_id) {
hir::Movability::Static => {
// Immovable coroutines are never `Unpin`, so
// suppress the normal auto-impl candidate for it.

View File

@@ -2185,7 +2185,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
}
ty::Coroutine(coroutine_def_id, args) => {
match self.tcx().movability(coroutine_def_id) {
match self.tcx().coroutine_movability(coroutine_def_id) {
hir::Movability::Static => None,
hir::Movability::Movable => {
if self.tcx().features().coroutine_clone {