1
Fork 0

Replace mk_foo calls with infer_foo where possible.

There are several `mk_foo`/`intern_foo` pairs, where the former takes an
iterator and the latter takes a slice. (This naming convention is bad,
but that's a fix for another PR.)

This commit changes several `mk_foo` occurrences into `intern_foo`,
avoiding the need for some `.iter()`/`.into_iter()` calls. Affected
cases:
- mk_type_list
- mk_tup
- mk_substs
- mk_const_list
This commit is contained in:
Nicholas Nethercote 2023-02-16 11:47:50 +11:00
parent 9556b56dbd
commit bcf0ec0191
20 changed files with 37 additions and 42 deletions

View file

@ -502,7 +502,7 @@ impl<'tcx> Collector<'tcx> {
.subst_identity()
.fn_sig(self.tcx)
.inputs()
.map_bound(|slice| self.tcx.mk_type_list(slice.iter())),
.map_bound(|slice| self.tcx.intern_type_list(slice)),
);
argument_types