summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-12-26 22:43:11 +0000
committerMichael Goulet <michael@errs.io>2023-12-28 16:35:01 +0000
commite24da8ea197b4b6724aaf7b5a5a2de64bb3c7445 (patch)
tree3c6d6e8b5b1f6adb15869238d11665fa48dab0fa /compiler/rustc_ty_utils/src
parent15ccf2e7bda95b5dd28cb98d5fee79592fb7b854 (diff)
downloadrust-e24da8ea197b4b6724aaf7b5a5a2de64bb3c7445.tar.gz
rust-e24da8ea197b4b6724aaf7b5a5a2de64bb3c7445.zip
Movability doesn't need to be a query anymore
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-rw-r--r--compiler/rustc_ty_utils/src/ty.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs
index 9cd750a6a31..2158aacab03 100644
--- a/compiler/rustc_ty_utils/src/ty.rs
+++ b/compiler/rustc_ty_utils/src/ty.rs
@@ -307,16 +307,6 @@ fn asyncness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Asyncness {
     })
 }
 
-fn movability(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Movability {
-    let hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(closure), .. }) =
-        tcx.hir_node_by_def_id(def_id)
-    else {
-        bug!("expected query `movability` only called on coroutine def id");
-    };
-
-    closure.movability.expect("expected coroutine to have movability")
-}
-
 fn unsizing_params_for_adt<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> BitSet<u32> {
     let def = tcx.adt_def(def_id);
     let num_params = tcx.generics_of(def_id).count();
@@ -364,7 +354,6 @@ fn unsizing_params_for_adt<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> BitSet<u32
 pub(crate) fn provide(providers: &mut Providers) {
     *providers = Providers {
         asyncness,
-        movability,
         adt_sized_constraint,
         param_env,
         param_env_reveal_all_normalized,