Auto merge of #101708 - compiler-errors:issue-101696, r=jackh726
Normalize closure signature after construction Astconv can't normalize inputs or outputs with escaping bound vars ([see this](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/fn_ctxt/mod.rs.html#294)), so normalize them after we've wrapped them in a binder. Fixes #101696
This commit is contained in:
commit
9279c547c7
2 changed files with 39 additions and 0 deletions
|
@ -641,6 +641,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue