-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #6348 Almost identical to print_stdout, this lint applies to the `eprintln!` and `eprint!` macros rather than `println!` and `print!`.
- Loading branch information
1 parent
aaed9d9
commit b81141c
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#![warn(clippy::print_stderr)] | ||
|
||
fn main() { | ||
eprintln!("Hello"); | ||
eprint!("World"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error: use of `eprintln!` | ||
--> $DIR/print_stderr.rs:4:5 | ||
| | ||
LL | eprintln!("Hello"); | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::print-stderr` implied by `-D warnings` | ||
|
||
error: use of `eprint!` | ||
--> $DIR/print_stderr.rs:5:5 | ||
| | ||
LL | eprint!("World"); | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|