mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-01 09:33:26 +00:00
Fix stat.rs to not pollute the build directory. Closes #6959.
This commit is contained in:
parent
c5fea4a673
commit
1ebb62f591
@ -20,7 +20,7 @@ use std::uint;
|
||||
|
||||
pub fn main() {
|
||||
let dir = tempfile::mkdtemp(&Path("."), "").unwrap();
|
||||
let path = dir.with_filename("file");
|
||||
let path = dir.push("file");
|
||||
|
||||
{
|
||||
match io::file_writer(&path, [io::Create, io::Truncate]) {
|
||||
@ -36,5 +36,6 @@ pub fn main() {
|
||||
assert!(path.exists());
|
||||
assert_eq!(path.get_size(), Some(1000));
|
||||
|
||||
os::remove_file(&path);
|
||||
os::remove_dir(&dir);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user