]> git.lizzy.rs Git - rust.git/commitdiff
Don't leave lingering files in doc tests
authorAlex Crichton <alex@alexcrichton.com>
Tue, 31 Dec 2013 20:43:52 +0000 (12:43 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 1 Jan 2014 21:06:44 +0000 (13:06 -0800)
Closes #11234

src/libstd/io/mod.rs
src/test/compile-fail/lint-missing-doc.rs

index 2d52986294d1c6884ea61e843e433e6c3d2d3083..13d67ff354a83d398e4eee8146d6f6e8b63ff057 100644 (file)
@@ -53,6 +53,8 @@
     # 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
index a083948bf8406786fb4d80e93470d32c58ab82c2..a6440e67f9bebfb56336fef83eeeca563d52b69d 100644 (file)
@@ -50,6 +50,7 @@ pub trait A {
     /// dox
     fn foo_with_impl() {}
 }
+#[allow(missing_doc)]
 trait B {
     fn foo();
     fn foo_with_impl() {}