-
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.
resolve #4542 by removing machine applicable suggestion
- Loading branch information
1 parent
535bc1d
commit 1bf5a76
Showing
3 changed files
with
25 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#![allow(unused_imports, clippy::blacklisted_name)] | ||
#![warn(clippy::explicit_write)] | ||
|
||
fn main() { | ||
let bar = "bar"; | ||
writeln!(std::io::stderr(), "foo {}", bar).unwrap(); | ||
} |
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[E0599]: no method named `write_fmt` found for type `std::io::Stderr` in the current scope | ||
--> $DIR/explicit_write_non_rustfix.rs:6:5 | ||
| | ||
LL | writeln!(std::io::stderr(), "foo {}", bar).unwrap(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `std::io::Stderr` | ||
| | ||
= help: items from traits can only be used if the trait is in scope | ||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) | ||
help: the following trait is implemented but not in scope, perhaps add a `use` for it: | ||
| | ||
LL | use std::io::Write; | ||
| | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0599`. |