diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-16 16:35:36 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-16 16:35:36 +0200 |
| commit | 05cc3c0a83fc7faab20a10f2e0eca61dc34a6394 (patch) | |
| tree | ade74b2da86114ad84c29fa18e78ca3b13070d4b | |
| parent | 56b055a6abf5f3cf0d4ae13026154eb82298b21b (diff) | |
| download | rust-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.rs | 4 |
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?") |
