Skip to content

Commit 31cec27

Browse files
committedJan 4, 2015
std::io::process test: ensure that path_val outlives the container that borrows it.
(part of fallout from new destructor lifetime rules.)
1 parent 7695573 commit 31cec27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/libstd/io/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1065,13 +1065,13 @@ mod tests {
10651065
#[test]
10661066
fn test_override_env() {
10671067
use os;
1068+
let path_val: String;
10681069
let mut new_env = vec![("RUN_TEST_NEW_ENV", "123")];
10691070

10701071
// In some build environments (such as chrooted Nix builds), `env` can
10711072
// only be found in the explicitly-provided PATH env variable, not in
10721073
// default places such as /bin or /usr/bin. So we need to pass through
10731074
// PATH to our sub-process.
1074-
let path_val: String;
10751075
match os::getenv("PATH") {
10761076
None => {}
10771077
Some(val) => {

0 commit comments

Comments
 (0)