Skip to content

Commit dac600e

Browse files
committed
Auto merge of rust-lang#9859 - koka831:no-run-side-effect, r=Manishearth
Avoid generating files via doctest When we run `cargo test` in `clippy_lints` directory, it will generate [`foo.txt`](https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/foo.txt) in the directory. In order to avoid that, this PR adds `no_run` to rustdoc which contains `File::create`. changelog: none
2 parents 38e0590 + 3f015a3 commit dac600e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/foo.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3077,7 +3077,7 @@ declare_clippy_lint! {
30773077
///
30783078
/// ### Example
30793079
///
3080-
/// ```rust
3080+
/// ```rust,no_run
30813081
/// use std::fs::File;
30823082
/// use std::io::{self, Write, Seek, SeekFrom};
30833083
///
@@ -3090,7 +3090,7 @@ declare_clippy_lint! {
30903090
/// }
30913091
/// ```
30923092
/// Use instead:
3093-
/// ```rust
3093+
/// ```rust,no_run
30943094
/// use std::fs::File;
30953095
/// use std::io::{self, Write, Seek, SeekFrom};
30963096
///

0 commit comments

Comments
 (0)