diff options
| author | bors <bors@rust-lang.org> | 2022-11-16 17:32:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-16 17:32:31 +0000 |
| commit | dac600e32fce89cb4b05ae6edb0c47982b99eb48 (patch) | |
| tree | d61444697cd670ae068fcc8197a0fc4cca129023 | |
| parent | 38e059028f0ecdaeb5af2b1b2509bd57f19871c7 (diff) | |
| parent | 3f015a363020d3811e1f028c9ce4b0705c728289 (diff) | |
| download | rust-dac600e32fce89cb4b05ae6edb0c47982b99eb48.tar.gz rust-dac600e32fce89cb4b05ae6edb0c47982b99eb48.zip | |
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
| -rw-r--r-- | clippy_lints/foo.txt | 1 | ||||
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/foo.txt b/clippy_lints/foo.txt deleted file mode 100644 index 5ab2f8a4323..00000000000 --- a/clippy_lints/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Hello \ No newline at end of file diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 43507f17e35..acb3b20a61b 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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}; /// |
