Skip to content

Commit 168f624

Browse files
committed
"avoid" is a better word here than "disable"
1 parent 824952f commit 168f624

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/middle/liveness.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1487,12 +1487,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
14871487
self.ir.tcx.lint_node_note(lint::builtin::UNUSED_VARIABLES, id, sp,
14881488
&format!("variable `{}` is assigned to, but never used",
14891489
name),
1490-
&format!("to disable this warning, consider using `_{}` instead",
1490+
&format!("to avoid this warning, consider using `_{}` instead",
14911491
name));
14921492
} else if name != "self" {
14931493
self.ir.tcx.lint_node_note(lint::builtin::UNUSED_VARIABLES, id, sp,
14941494
&format!("unused variable: `{}`", name),
1495-
&format!("to disable this warning, consider using `_{}` instead",
1495+
&format!("to avoid this warning, consider using `_{}` instead",
14961496
name));
14971497
}
14981498
}

src/test/ui/span/issue-24690.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: lint level defined here
1010
18 | #![warn(unused)]
1111
| ^^^^^^
1212
= note: #[warn(unused_variables)] implied by #[warn(unused)]
13-
= note: to disable this warning, consider using `_theOtherTwo` instead
13+
= note: to avoid this warning, consider using `_theOtherTwo` instead
1414

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

0 commit comments

Comments
 (0)