about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-09-12 04:20:26 +0000
committerMichael Goulet <michael@errs.io>2022-09-12 04:20:58 +0000
commit2db0492e6264d22629ed75b60f8c0dcebc451966 (patch)
treed4914d288178d9da4f828943c80032cce2a94542 /compiler
parentfa521a469153702972f6bf3988f106902985cd28 (diff)
downloadrust-2db0492e6264d22629ed75b60f8c0dcebc451966.tar.gz
rust-2db0492e6264d22629ed75b60f8c0dcebc451966.zip
Normalize closure signature after construction
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/check/closure.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_typeck/src/check/closure.rs b/compiler/rustc_typeck/src/check/closure.rs
index 55cbaf71e7c..893227d3e7d 100644
--- a/compiler/rustc_typeck/src/check/closure.rs
+++ b/compiler/rustc_typeck/src/check/closure.rs
@@ -624,6 +624,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             ),
             bound_vars,
         );
+        // Astconv can't normalize inputs or outputs with escaping bound vars,
+        // so normalize them here, after we've wrapped them in a binder.
+        let result = self.normalize_associated_types_in(self.tcx.hir().span(hir_id), result);
 
         let c_result = self.inh.infcx.canonicalize_response(result);
         self.typeck_results.borrow_mut().user_provided_sigs.insert(expr_def_id, c_result);