diff options
Diffstat (limited to 'compiler/rustc_target/src/spec/mod.rs')
| -rw-r--r-- | compiler/rustc_target/src/spec/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 0d49c7f6ee8..72d9b501545 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -42,6 +42,7 @@ use rustc_serialize::json::{Json, ToJson}; use rustc_span::symbol::{sym, Symbol}; use std::collections::BTreeMap; use std::convert::TryFrom; +use std::iter::FromIterator; use std::ops::{Deref, DerefMut}; use std::path::{Path, PathBuf}; use std::str::FromStr; @@ -2173,12 +2174,11 @@ impl Target { // Additionally look in the sysroot under `lib/rustlib/<triple>/target.json` // as a fallback. let rustlib_path = crate::target_rustlib_path(&sysroot, &target_triple); - let p = std::array::IntoIter::new([ + let p = PathBuf::from_iter([ Path::new(sysroot), Path::new(&rustlib_path), Path::new("target.json"), - ]) - .collect::<PathBuf>(); + ]); if p.is_file() { return load_file(&p); } |
