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:
@@ -1190,7 +1190,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
self.mk_imm_ref(
|
||||
self.lifetimes.re_static,
|
||||
self.type_of(self.require_lang_item(LangItem::PanicLocation, None))
|
||||
.subst(self, self.mk_substs([self.lifetimes.re_static.into()].iter())),
|
||||
.subst(self, self.intern_substs(&[self.lifetimes.re_static.into()])),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user