Remove Copy
bound from enter_forall
This commit is contained in:
parent
b2728d5426
commit
921c226eb6
2 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ impl<'tcx> rustc_type_ir::InferCtxtLike for InferCtxt<'tcx> {
|
|||
)
|
||||
}
|
||||
|
||||
fn enter_forall<T: TypeFoldable<TyCtxt<'tcx>> + Copy, U>(
|
||||
fn enter_forall<T: TypeFoldable<TyCtxt<'tcx>>, U>(
|
||||
&self,
|
||||
value: ty::Binder<'tcx, T>,
|
||||
f: impl FnOnce(T) -> U,
|
||||
|
|
|
@ -24,9 +24,9 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
#[instrument(level = "debug", skip(self), ret)]
|
||||
pub fn enter_forall_and_leak_universe<T>(&self, binder: ty::Binder<'tcx, T>) -> T
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
if let Some(inner) = binder.no_bound_vars() {
|
||||
if let Some(inner) = binder.clone().no_bound_vars() {
|
||||
return inner;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
#[instrument(level = "debug", skip(self, f))]
|
||||
pub fn enter_forall<T, U>(&self, forall: ty::Binder<'tcx, T>, f: impl FnOnce(T) -> U) -> U
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
// FIXME: currently we do nothing to prevent placeholders with the new universe being
|
||||
// used after exiting `f`. For example region subtyping can result in outlives constraints
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue