Don't leave lingering files in doc tests

Closes #11234
This commit is contained in:
Alex Crichton 2013-12-31 12:43:52 -08:00
parent 0daaeab244
commit aca1749493
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -50,6 +50,7 @@ pub trait A {
/// dox
fn foo_with_impl() {}
}
#[allow(missing_doc)]
trait B {
fn foo();
fn foo_with_impl() {}