about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHMPerson1 <hmperson1@gmail.com>2019-10-16 17:12:41 -0400
committerHMPerson1 <hmperson1@gmail.com>2019-10-16 17:12:41 -0400
commit106a72592c024f0e03500cb17fd1fd28566866b0 (patch)
tree48f5e912fb4ac4977b099755c57afbce5eca472c
parent76b44f34b9ecd531b761b9fb10edc90671734d0e (diff)
downloadrust-106a72592c024f0e03500cb17fd1fd28566866b0.tar.gz
rust-106a72592c024f0e03500cb17fd1fd28566866b0.zip
Dogfood for `inefficient_to_string`
-rw-r--r--clippy_lints/src/replace_consts.rs2
-rw-r--r--clippy_lints/src/utils/attrs.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/replace_consts.rs b/clippy_lints/src/replace_consts.rs
index d3dd4cb9041..6bbccfa09e8 100644
--- a/clippy_lints/src/replace_consts.rs
+++ b/clippy_lints/src/replace_consts.rs
@@ -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,
diff --git a/clippy_lints/src/utils/attrs.rs b/clippy_lints/src/utils/attrs.rs
index 11340f69aa2..eaad932cb67 100644
--- a/clippy_lints/src/utils/attrs.rs
+++ b/clippy_lints/src/utils/attrs.rs
@@ -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