Skip to content

Commit 73036da

Browse files
committed
Auto merge of #6829 - ehuss:fix-mutable-borrow, r=alexcrichton
Fix mutable_borrow_reservation_conflict warning. nightly-2019-04-08 added a more restrictive borrowing rule (rust-lang/rust#58739).
2 parents f5b60ac + f9f339a commit 73036da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/testsuite/support/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,8 @@ impl Execs {
791791
pub fn cwd<T: AsRef<OsStr>>(&mut self, path: T) -> &mut Self {
792792
if let Some(ref mut p) = self.process_builder {
793793
if let Some(cwd) = p.get_cwd() {
794-
p.cwd(cwd.join(path.as_ref()));
794+
let new_path = cwd.join(path.as_ref());
795+
p.cwd(new_path);
795796
} else {
796797
p.cwd(path);
797798
}

0 commit comments

Comments
 (0)