Skip to content

Commit

Permalink
Rollup merge of rust-lang#44569 - est31:master, r=estebank
Browse files Browse the repository at this point in the history
"avoid" is a better word here than "disable"

You don't "disable" the warning really, you just avoid it (as a conscious action).
  • Loading branch information
frewsxcv authored Sep 15, 2017
2 parents 4af8acd + 168f624 commit 2a86884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc/middle/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1487,12 +1487,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
self.ir.tcx.lint_node_note(lint::builtin::UNUSED_VARIABLES, id, sp,
&format!("variable `{}` is assigned to, but never used",
name),
&format!("to disable this warning, consider using `_{}` instead",
&format!("to avoid this warning, consider using `_{}` instead",
name));
} else if name != "self" {
self.ir.tcx.lint_node_note(lint::builtin::UNUSED_VARIABLES, id, sp,
&format!("unused variable: `{}`", name),
&format!("to disable this warning, consider using `_{}` instead",
&format!("to avoid this warning, consider using `_{}` instead",
name));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/span/issue-24690.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: lint level defined here
18 | #![warn(unused)]
| ^^^^^^
= note: #[warn(unused_variables)] implied by #[warn(unused)]
= note: to disable this warning, consider using `_theOtherTwo` instead
= note: to avoid this warning, consider using `_theOtherTwo` instead

warning: variable `theTwo` should have a snake case name such as `the_two`
--> $DIR/issue-24690.rs:22:9
Expand Down

0 comments on commit 2a86884

Please sign in to comment.