Auto merge of #108112 - nnethercote:clarify-iterator-interners, r=oli-obk,compiler-errors

Clarify iterator interners

I found the iterator interners very confusing. This PR clarifies things.

r? `@compiler-errors`
This commit is contained in:
bors 2023-02-18 00:20:52 +00:00
commit a9842c73bc
36 changed files with 173 additions and 186 deletions

View file

@ -141,8 +141,8 @@ fn fn_sig_for_fn_abi<'tcx>(
ty::Binder::bind_with_vars(
tcx.mk_fn_sig(
[env_ty, resume_ty].iter(),
&ret_ty,
[env_ty, resume_ty],
ret_ty,
false,
hir::Unsafety::Normal,
rustc_target::spec::abi::Abi::Rust,

View file

@ -144,7 +144,7 @@ fn recurse_build<'tcx>(
for &id in args.iter() {
new_args.push(recurse_build(tcx, body, id, root_span)?);
}
let new_args = tcx.mk_const_list(new_args.iter());
let new_args = tcx.intern_const_list(&new_args);
tcx.mk_const(Expr::FunctionCall(fun, new_args), node.ty)
}
&ExprKind::Binary { op, lhs, rhs } if check_binop(op) => {