Dogfood for inefficient_to_string

This commit is contained in:
HMPerson1 2019-10-16 17:12:41 -04:00
parent 76b44f34b9
commit 106a72592c
No known key found for this signature in database
GPG key ID: 1FB477DDD27821CE
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ReplaceConsts {
if let hir::ExprKind::Path(ref qp) = expr.kind;
if let Res::Def(DefKind::Const, def_id) = cx.tables.qpath_res(qp, expr.hir_id);
then {
for (const_path, repl_snip) in &REPLACEMENTS {
for &(ref const_path, repl_snip) in &REPLACEMENTS {
if match_def_path(cx, def_id, const_path) {
span_lint_and_sugg(
cx,

View file

@ -71,7 +71,7 @@ pub fn get_attr<'a>(
})
{
let mut db = sess.struct_span_err(attr_segments[1].ident.span, "Usage of deprecated attribute");
match deprecation_status {
match *deprecation_status {
DeprecationStatus::Deprecated => {
db.emit();
false