about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_codegen_llvm/back')
-rw-r--r--src/librustc_codegen_llvm/back/rpath.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/back/rpath.rs b/src/librustc_codegen_llvm/back/rpath.rs
index e73073cfad0..2c3a143646c 100644
--- a/src/librustc_codegen_llvm/back/rpath.rs
+++ b/src/librustc_codegen_llvm/back/rpath.rs
@@ -152,9 +152,7 @@ fn path_relative_from(path: &Path, base: &Path) -> Option<PathBuf> {
                 (Some(_), Some(b)) if b == Component::ParentDir => return None,
                 (Some(a), Some(_)) => {
                     comps.push(Component::ParentDir);
-                    for _ in itb {
-                        comps.push(Component::ParentDir);
-                    }
+                    comps.extend(itb.map(|_| Component::ParentDir));
                     comps.push(a);
                     comps.extend(ita.by_ref());
                     break;