1
Fork 0

remove Ty::is_copy_modulo_regions

This commit is contained in:
lcnr 2024-12-02 13:57:56 +01:00
parent cfee10ce89
commit e089bead32
15 changed files with 36 additions and 29 deletions

View file

@ -176,7 +176,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
let ty = expr.ty;
if !ty.is_sized(tcx, this.typing_env()) {
// !sized means !copy, so this is an unsized move
assert!(!ty.is_copy_modulo_regions(tcx, this.typing_env()));
assert!(!tcx.type_is_copy_modulo_regions(this.typing_env(), ty));
// As described above, detect the case where we are passing a value of unsized
// type, and that value is coming from the deref of a box.

View file

@ -780,7 +780,7 @@ fn check_borrow_conflicts_in_at_patterns<'tcx>(cx: &MatchVisitor<'_, 'tcx>, pat:
return;
};
let is_binding_by_move = |ty: Ty<'tcx>| !ty.is_copy_modulo_regions(cx.tcx, cx.typing_env);
let is_binding_by_move = |ty: Ty<'tcx>| !cx.tcx.type_is_copy_modulo_regions(cx.typing_env, ty);
let sess = cx.tcx.sess;