1
Fork 0

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

@ -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,