Auto merge of #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
This commit is contained in:
bors 2022-11-16 17:32:31 +00:00
commit dac600e32f
2 changed files with 2 additions and 3 deletions

View File

@ -1 +0,0 @@
Hello

View File

@ -3077,7 +3077,7 @@ declare_clippy_lint! {
///
/// ### Example
///
/// ```rust
/// ```rust,no_run
/// use std::fs::File;
/// use std::io::{self, Write, Seek, SeekFrom};
///
@ -3090,7 +3090,7 @@ declare_clippy_lint! {
/// }
/// ```
/// Use instead:
/// ```rust
/// ```rust,no_run
/// use std::fs::File;
/// use std::io::{self, Write, Seek, SeekFrom};
///