From 168f624c7cf8ca0209b5adac19bc361549ca70a9 Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 14 Sep 2017 17:22:15 +0200 Subject: [PATCH] "avoid" is a better word here than "disable" --- src/librustc/middle/liveness.rs | 4 ++-- src/test/ui/span/issue-24690.stderr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 80beaaed051d..d4fa03b50856 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -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)); } } diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index d4c0eb21342f..718720ebf838 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -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