Skip to content

Commit

Permalink
"avoid" is a better word here than "disable"
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Sep 14, 2017
1 parent 824952f commit 168f624
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 168f624

Please sign in to comment.