Stop using is_copy_modulo_regions when building clone shim

This commit is contained in:
Michael Goulet 2024-02-07 20:14:35 +00:00
parent eb7a0f8eb6
commit 24d806ccfa
2 changed files with 2 additions and 7 deletions

View file

@ -209,10 +209,8 @@ fn resolve_associated_item<'tcx>(
let name = tcx.item_name(trait_item_id);
if name == sym::clone {
let self_ty = trait_ref.self_ty();
let is_copy = self_ty.is_copy_modulo_regions(tcx, param_env);
match self_ty.kind() {
_ if is_copy => (),
ty::FnDef(..) | ty::FnPtr(_) => (),
ty::Coroutine(..)
| ty::CoroutineWitness(..)
| ty::Closure(..)