about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-16 16:35:36 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-09-16 16:35:36 +0200
commit05cc3c0a83fc7faab20a10f2e0eca61dc34a6394 (patch)
treeade74b2da86114ad84c29fa18e78ca3b13070d4b
parent56b055a6abf5f3cf0d4ae13026154eb82298b21b (diff)
downloadrust-05cc3c0a83fc7faab20a10f2e0eca61dc34a6394.tar.gz
rust-05cc3c0a83fc7faab20a10f2e0eca61dc34a6394.zip
or-patterns: liveness: `is_argument` -> `is_param`.
Pacify `tidy`. It's also more correct in this context.
-rw-r--r--src/librustc/middle/liveness.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index 9afd147ae34..9f6611712a8 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -1550,9 +1550,9 @@ impl<'tcx> Liveness<'_, 'tcx> {
         }
     }
 
-    fn report_dead_assign(&self, hir_id: HirId, spans: Vec<Span>, var: Variable, is_argument: bool) {
+    fn report_dead_assign(&self, hir_id: HirId, spans: Vec<Span>, var: Variable, is_param: bool) {
         if let Some(name) = self.should_warn(var) {
-            if is_argument {
+            if is_param {
                 self.ir.tcx.struct_span_lint_hir(lint::builtin::UNUSED_ASSIGNMENTS, hir_id, spans,
                 &format!("value passed to `{}` is never read", name))
                 .help("maybe it is overwritten before being read?")