Skip to content

Commit

Permalink
or-patterns: liveness: is_argument -> is_param.
Browse files Browse the repository at this point in the history
Pacify `tidy`. It's also more correct in this context.
  • Loading branch information
Centril committed Sep 16, 2019
1 parent 56b055a commit 05cc3c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/middle/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?")
Expand Down

0 comments on commit 05cc3c0

Please sign in to comment.