use std::hash::{Hash, Hasher};
use syntax::ast;
use syntax_pos::{MultiSpan, Span};
-use errors::{DiagnosticBuilder, DiagnosticId};
+use errors::{Applicability, DiagnosticBuilder, DiagnosticId};
use rustc::hir;
use rustc::hir::intravisit::{self, Visitor};
snippet
);
} else {
- db.span_label(
+ db.span_suggestion_with_applicability(
let_span,
- format!("consider changing this to `mut {}`", snippet),
+ "make this binding mutable",
+ format!("mut {}", snippet),
+ Applicability::MachineApplicable,
);
}
}