diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-31 12:43:52 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-01-01 13:06:44 -0800 |
| commit | aca1749493438d7f6283a214aa0d8230166cfa21 (patch) | |
| tree | cd719ec88953daee6d177a76a2c2d755cf5011eb /src/libstd/io | |
| parent | 0daaeab244a583b6bb5b88c41ad0fdd51388619d (diff) | |
| download | rust-aca1749493438d7f6283a214aa0d8230166cfa21.tar.gz rust-aca1749493438d7f6283a214aa0d8230166cfa21.zip | |
Don't leave lingering files in doc tests
Closes #11234
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 2d52986294d..13d67ff354a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -53,6 +53,8 @@ Some examples of obvious things you might want to do # let _g = ::std::io::ignore_io_error(); let mut file = File::create(&Path::new("message.txt")); file.write(bytes!("hello, file!\n")); + # drop(file); + # ::std::io::fs::unlink(&Path::new("message.txt")); ``` * Iterate over the lines of a file |
