Skip to content

Commit 3f015a3

Browse files
committed
Avoid generating files via doctest
When we run `cargo test` in `clippy_lints` directory, it will generate `foo.txt` in the directory. In order to avoid that, add `no_run` to rustdoc which contains `File::create`.
1 parent 38e0590 commit 3f015a3

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)