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:
parent
9556b56dbd
commit
bcf0ec0191
20 changed files with 37 additions and 42 deletions
|
@ -1923,7 +1923,7 @@ fn confirm_builtin_candidate<'cx, 'tcx>(
|
|||
) -> Progress<'tcx> {
|
||||
let tcx = selcx.tcx();
|
||||
let self_ty = obligation.predicate.self_ty();
|
||||
let substs = tcx.mk_substs([self_ty.into()].iter());
|
||||
let substs = tcx.intern_substs(&[self_ty.into()]);
|
||||
let lang_items = tcx.lang_items();
|
||||
let item_def_id = obligation.predicate.def_id;
|
||||
let trait_def_id = tcx.trait_of_item(item_def_id).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue