Skip to content

Commit 02536fe

Browse files
committed
The hack isn't necessary for back compat anymore
1 parent 7f933de commit 02536fe

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_typeck/src/check/fn_ctxt

1 file changed

+2
-1
lines changed

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
759759
let formal_ret = self.resolve_vars_with_obligations(formal_ret);
760760
let Some(ret_ty) = expected_ret.only_has_type(self) else { return Vec::new() };
761761

762-
// HACK(oli-obk): This is a backwards compatibility hack. Without it, the inference
762+
// HACK(oli-obk): This is a hack to keep RPIT and TAIT in sync wrt their behaviour.
763+
// Without it, the inference
763764
// variable will get instantiated with the opaque type. The inference variable often
764765
// has various helpful obligations registered for it that help closures figure out their
765766
// signature. If we infer the inference var to the opaque type, the closure won't be able

0 commit comments

Comments
 (0)