Skip to content

Commit d945967

Browse files
Remove comment, simplify since we asserted fn ptr Self type has no bound vars
1 parent c7330c9 commit d945967

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

compiler/rustc_trait_selection/src/traits/select/confirmation.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
605605
{
606606
debug!(?obligation, "confirm_fn_pointer_candidate");
607607

608-
// Okay to skip binder; it is reintroduced below.
609608
let self_ty = self
610609
.infcx
611610
.shallow_resolve(obligation.self_ty().no_bound_vars())
@@ -624,15 +623,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
624623

625624
// Confirm the `type Output: Sized;` bound that is present on `FnOnce`
626625
let cause = obligation.derived_cause(BuiltinDerivedObligation);
627-
// The binder on the Fn obligation is "less" important than the one on
628-
// the signature, as evidenced by how we treat it during projection.
629-
// The safe thing to do here is to liberate it, though, which should
630-
// have no worse effect than skipping the binder here.
631-
let liberated_fn_ty =
632-
self.infcx.replace_bound_vars_with_placeholders(obligation.predicate.rebind(self_ty));
633-
let output_ty = self
634-
.infcx
635-
.replace_bound_vars_with_placeholders(liberated_fn_ty.fn_sig(self.tcx()).output());
626+
let output_ty = self.infcx.replace_bound_vars_with_placeholders(sig.output());
636627
let output_ty = normalize_with_depth_to(
637628
self,
638629
obligation.param_env,

0 commit comments

Comments
 (0)