// probably flatten the binder from the obligation and the binder
// from the object. Have to try to make a broken test case that
// results.
- let self_ty = self.infcx.shallow_resolve(*obligation.self_ty().skip_binder());
+ let self_ty = self.infcx.shallow_resolve(obligation.self_ty().skip_binder());
let poly_trait_ref = match self_ty.kind {
ty::Dynamic(ref data, ..) => data
.principal()
debug!("confirm_fn_pointer_candidate({:?})", obligation);
// Okay to skip binder; it is reintroduced below.
- let self_ty = self.infcx.shallow_resolve(*obligation.self_ty().skip_binder());
+ let self_ty = self.infcx.shallow_resolve(obligation.self_ty().skip_binder());
let sig = self_ty.fn_sig(self.tcx());
let trait_ref = closure_trait_ref_and_return_type(
self.tcx(),
// Okay to skip binder because the substs on generator types never
// touch bound regions, they just capture the in-scope
// type/region parameters.
- let self_ty = self.infcx.shallow_resolve(*obligation.self_ty().skip_binder());
+ let self_ty = self.infcx.shallow_resolve(obligation.self_ty().skip_binder());
let (generator_def_id, substs) = match self_ty.kind {
ty::Generator(id, substs, _) => (id, substs),
_ => bug!("closure candidate for non-closure {:?}", obligation),
// Okay to skip binder because the substs on closure types never
// touch bound regions, they just capture the in-scope
// type/region parameters.
- let self_ty = self.infcx.shallow_resolve(*obligation.self_ty().skip_binder());
+ let self_ty = self.infcx.shallow_resolve(obligation.self_ty().skip_binder());
let (closure_def_id, substs) = match self_ty.kind {
ty::Closure(id, substs) => (id, substs),
_ => bug!("closure candidate for non-closure {:?}", obligation),
obligations.push(Obligation::new(
obligation.cause.clone(),
obligation.param_env,
- ty::PredicateKind::ClosureKind(closure_def_id, substs, kind)
+ ty::PredicateAtom::ClosureKind(closure_def_id, substs, kind)
.to_predicate(self.tcx()),
));
}