Skip to content

Commit

Permalink
#3016 Add backticks for the msg
Browse files Browse the repository at this point in the history
  • Loading branch information
elpiel committed Aug 20, 2018
1 parent c292b80 commit 76f7bfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/write.rs
Expand Up @@ -219,7 +219,7 @@ impl EarlyLintPass for Pass {
cx,
WRITELN_EMPTY_STRING,
mac.span,
format!("using writeln!({}, \"\")", suggestion).as_str(),
format!("using `writeln!({}, \"\")`", suggestion).as_str(),
"replace it with",
format!("writeln!({})", suggestion),
);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/writeln_empty_string.stderr
@@ -1,12 +1,12 @@
error: using writeln!(&mut v, "")
error: using `writeln!(&mut v, "")`
--> $DIR/writeln_empty_string.rs:9:5
|
9 | writeln!(&mut v, "");
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `writeln!(&mut v)`
|
= note: `-D writeln-empty-string` implied by `-D warnings`

error: using writeln!(&mut suggestion, "")
error: using `writeln!(&mut suggestion, "")`
--> $DIR/writeln_empty_string.rs:12:5
|
12 | writeln!(&mut suggestion, "");
Expand Down

0 comments on commit 76f7bfc

Please sign in to comment.