rustpkg: Implement RUST_PATH
Unfortunately, the main test for this is ignored due to #7071. Closes #5682
This commit is contained in:
parent
9b6dfb8578
commit
ea62fd1090
3 changed files with 94 additions and 11 deletions
|
@ -382,6 +382,15 @@ impl Path {
|
|||
Some(ref st) => Some(st.st_mode as uint),
|
||||
}
|
||||
}
|
||||
|
||||
/// Execute a function on p as well as all of its ancestors
|
||||
pub fn each_parent(&self, f: &fn(&Path)) {
|
||||
if !self.components.is_empty() {
|
||||
f(self);
|
||||
self.pop().each_parent(f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue