summary refs log tree commit diff
path: root/compiler/rustc_session/src/session.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-05 12:53:01 +0000
committerbors <bors@rust-lang.org>2021-12-05 12:53:01 +0000
commit1597728ef5820d3ffcb9d3f0c890ef7802398751 (patch)
tree1a86c2a2cb56d502776e6cc3936ec683efb62ffb /compiler/rustc_session/src/session.rs
parentcafc4582e66c478b6b297ae85b225c788106015e (diff)
parent27d39357b7052d96e1b3903518841d14534c38cf (diff)
downloadrust-1597728ef5820d3ffcb9d3f0c890ef7802398751.tar.gz
rust-1597728ef5820d3ffcb9d3f0c890ef7802398751.zip
Auto merge of #88611 - m-ou-se:array-into-iter-new-deprecate, r=joshtriplett
Deprecate array::IntoIter::new.
Diffstat (limited to 'compiler/rustc_session/src/session.rs')
-rw-r--r--compiler/rustc_session/src/session.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 52a92de842f..e37d504135d 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -792,12 +792,11 @@ impl Session {
     /// Returns a list of directories where target-specific tool binaries are located.
     pub fn get_tools_search_paths(&self, self_contained: bool) -> Vec<PathBuf> {
         let rustlib_path = rustc_target::target_rustlib_path(&self.sysroot, &config::host_triple());
-        let p = std::array::IntoIter::new([
+        let p = PathBuf::from_iter([
             Path::new(&self.sysroot),
             Path::new(&rustlib_path),
             Path::new("bin"),
-        ])
-        .collect::<PathBuf>();
+        ]);
         if self_contained { vec![p.clone(), p.join("self-contained")] } else { vec![p] }
     }