Skip to content

Commit 2a86884

Browse files
authored
Rollup merge of #44569 - est31:master, r=estebank
"avoid" is a better word here than "disable" You don't "disable" the warning really, you just avoid it (as a conscious action).
2 parents 4af8acd + 168f624 commit 2a86884

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/middle/liveness.rs

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)