about summary refs log tree commit diff
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2021-03-12 20:59:41 +0100
committerxFrednet <xFrednet@gmail.com>2021-05-05 18:38:26 +0200
commit62cafe2c02440cb1cc7cc9cbf1abe63942a19e51 (patch)
treef3823ef4a2139c94e2af247b4f1c8ddd60841f2d
parentc1fa1102d484b74cb7bc425994fa4246dd690ad3 (diff)
downloadrust-62cafe2c02440cb1cc7cc9cbf1abe63942a19e51.tar.gz
rust-62cafe2c02440cb1cc7cc9cbf1abe63942a19e51.zip
Applying PR suggestions
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 07abae31386..b7bb557f957 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -32,7 +32,7 @@ use crate::utils::{
 };
 
 /// This is the output file of the lint collector.
-const OUTPUT_FILE: &str = "../metadata_collection.json";
+const OUTPUT_FILE: &str = "../util/gh-pages/metadata_collection.json";
 /// These lints are excluded from the export.
 const BLACK_LISTED_LINTS: [&str; 3] = ["lint_author", "deep_code_inspection", "internal_metadata_collector"];
 /// These groups will be ignored by the lint group matcher. This is useful for collections like
@@ -62,7 +62,7 @@ const SUGGESTION_DIAGNOSTIC_BUILDER_METHODS: [(&str, bool); 9] = [
     ("span_suggestions", true),
 ];
 const SUGGESTION_FUNCTIONS: [&[&str]; 2] = [
-    &["clippy_utils", "diagnostics", "mutispan_sugg"],
+    &["clippy_utils", "diagnostics", "multispan_sugg"],
     &["clippy_utils", "diagnostics", "multispan_sugg_with_applicability"],
 ];
 
@@ -226,11 +226,8 @@ impl<'hir> LateLintPass<'hir> for MetadataCollector {
     fn check_item(&mut self, cx: &LateContext<'hir>, item: &'hir Item<'_>) {
         if_chain! {
             // item validation
-            if let ItemKind::Static(ref ty, Mutability::Not, body_id) = item.kind;
+            if let ItemKind::Static(ref ty, Mutability::Not, _) = item.kind;
             if is_lint_ref_type(cx, ty);
-            let expr = &cx.tcx.hir().body(body_id).value;
-            if let ExprKind::AddrOf(_, _, ref inner_exp) = expr.kind;
-            if let ExprKind::Struct(_, _, _) = inner_exp.kind;
             // blacklist check
             let lint_name = sym_to_string(item.ident.name).to_ascii_lowercase();
             if !BLACK_LISTED_LINTS.contains(&lint_name.as_str());