Remove redundant code in copy_clone_conditions
This was left over from when closure copy and clone were gated behind feature flags.
This commit is contained in:
parent
6d599337fa
commit
b2c0fd0876
1 changed files with 4 additions and 10 deletions
|
@ -2505,16 +2505,10 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
ty::Closure(def_id, substs) => {
|
ty::Closure(def_id, substs) => {
|
||||||
let trait_id = obligation.predicate.def_id();
|
// (*) binder moved here
|
||||||
let is_copy_trait = Some(trait_id) == self.tcx().lang_items().copy_trait();
|
Where(ty::Binder::bind(
|
||||||
let is_clone_trait = Some(trait_id) == self.tcx().lang_items().clone_trait();
|
substs.upvar_tys(def_id, self.tcx()).collect(),
|
||||||
if is_copy_trait || is_clone_trait {
|
))
|
||||||
Where(ty::Binder::bind(
|
|
||||||
substs.upvar_tys(def_id, self.tcx()).collect(),
|
|
||||||
))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ty::Adt(..) | ty::Projection(..) | ty::Param(..) | ty::Opaque(..) => {
|
ty::Adt(..) | ty::Projection(..) | ty::Param(..) | ty::Opaque(..) => {
|
||||||
|
|
Loading…
Reference in a new issue