Remove comment, simplify since we asserted fn ptr Self type has no bound vars
This commit is contained in:
parent
c7330c9fe8
commit
d945967779
@ -605,7 +605,6 @@ fn confirm_fn_pointer_candidate(
|
||||
{
|
||||
debug!(?obligation, "confirm_fn_pointer_candidate");
|
||||
|
||||
// Okay to skip binder; it is reintroduced below.
|
||||
let self_ty = self
|
||||
.infcx
|
||||
.shallow_resolve(obligation.self_ty().no_bound_vars())
|
||||
@ -624,15 +623,7 @@ fn confirm_fn_pointer_candidate(
|
||||
|
||||
// Confirm the `type Output: Sized;` bound that is present on `FnOnce`
|
||||
let cause = obligation.derived_cause(BuiltinDerivedObligation);
|
||||
// The binder on the Fn obligation is "less" important than the one on
|
||||
// the signature, as evidenced by how we treat it during projection.
|
||||
// The safe thing to do here is to liberate it, though, which should
|
||||
// have no worse effect than skipping the binder here.
|
||||
let liberated_fn_ty =
|
||||
self.infcx.replace_bound_vars_with_placeholders(obligation.predicate.rebind(self_ty));
|
||||
let output_ty = self
|
||||
.infcx
|
||||
.replace_bound_vars_with_placeholders(liberated_fn_ty.fn_sig(self.tcx()).output());
|
||||
let output_ty = self.infcx.replace_bound_vars_with_placeholders(sig.output());
|
||||
let output_ty = normalize_with_depth_to(
|
||||
self,
|
||||
obligation.param_env,
|
||||
|
Loading…
Reference in New Issue
Block a user