diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-02-17 15:02:17 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-03-28 16:59:56 +0000 |
| commit | 02536fe18b78c0bbda2543617d75a4873e1016dd (patch) | |
| tree | 4cc01630604fba9fb78b56b5f94ef2e7132bd30b | |
| parent | 7f933de1946b49960e6522d6520d9a065fdb8a8d (diff) | |
| download | rust-02536fe18b78c0bbda2543617d75a4873e1016dd.tar.gz rust-02536fe18b78c0bbda2543617d75a4873e1016dd.zip | |
The hack isn't necessary for back compat anymore
| -rw-r--r-- | compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs b/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs index 6e3013cde7b..97935efd4f0 100644 --- a/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs +++ b/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs @@ -759,7 +759,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let formal_ret = self.resolve_vars_with_obligations(formal_ret); let Some(ret_ty) = expected_ret.only_has_type(self) else { return Vec::new() }; - // HACK(oli-obk): This is a backwards compatibility hack. Without it, the inference + // HACK(oli-obk): This is a hack to keep RPIT and TAIT in sync wrt their behaviour. + // Without it, the inference // variable will get instantiated with the opaque type. The inference variable often // has various helpful obligations registered for it that help closures figure out their // signature. If we infer the inference var to the opaque type, the closure won't be able |
