diff options
Diffstat (limited to 'compiler/rustc_session/src/session.rs')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 5 |
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] } } |
