about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-02-16 11:47:50 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-17 22:24:31 +1100
commitbcf0ec019172ccb34e2f53c07cd3b76d506d249a (patch)
treec4c34ce6df6c6c92827b71c0cac8e72756881229 /compiler/rustc_mir_transform/src
parent9556b56dbdbd4238f0051e7230004b0aa488fa14 (diff)
downloadrust-bcf0ec019172ccb34e2f53c07cd3b76d506d249a.tar.gz
rust-bcf0ec019172ccb34e2f53c07cd3b76d506d249a.zip
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
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/shim.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs
index 7f388b065ad..682ad081f5c 100644
--- a/compiler/rustc_mir_transform/src/shim.rs
+++ b/compiler/rustc_mir_transform/src/shim.rs
@@ -597,7 +597,7 @@ fn build_call_shim<'tcx>(
         let untuple_args = sig.inputs();
 
         // Create substitutions for the `Self` and `Args` generic parameters of the shim body.
-        let arg_tup = tcx.mk_tup(untuple_args.iter());
+        let arg_tup = tcx.intern_tup(untuple_args);
 
         (Some([ty.into(), arg_tup.into()]), Some(untuple_args))
     } else {