about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/disallowed_macros.rs8
-rw-r--r--tests/ui/auxiliary/external_item.rs2
-rw-r--r--tests/ui/used_underscore_items.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/clippy_lints/src/disallowed_macros.rs b/clippy_lints/src/disallowed_macros.rs
index 37a12119731..044903ce575 100644
--- a/clippy_lints/src/disallowed_macros.rs
+++ b/clippy_lints/src/disallowed_macros.rs
@@ -71,11 +71,11 @@ pub struct DisallowedMacros {
 
     // When a macro is disallowed in an early pass, it's stored
     // and emitted during the late pass. This happens for attributes.
-    earlies: AttrStorage,
+    early_macro_cache: AttrStorage,
 }
 
 impl DisallowedMacros {
-    pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, earlies: AttrStorage) -> Self {
+    pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, early_macro_cache: AttrStorage) -> Self {
         let (disallowed, _) = create_disallowed_map(
             tcx,
             &conf.disallowed_macros,
@@ -88,7 +88,7 @@ impl DisallowedMacros {
             disallowed,
             seen: FxHashSet::default(),
             derive_src: None,
-            earlies,
+            early_macro_cache,
         }
     }
 
@@ -129,7 +129,7 @@ impl_lint_pass!(DisallowedMacros => [DISALLOWED_MACROS]);
 impl LateLintPass<'_> for DisallowedMacros {
     fn check_crate(&mut self, cx: &LateContext<'_>) {
         // once we check a crate in the late pass we can emit the early pass lints
-        if let Some(attr_spans) = self.earlies.clone().0.get() {
+        if let Some(attr_spans) = self.early_macro_cache.clone().0.get() {
             for span in attr_spans {
                 self.check(cx, *span, None);
             }
diff --git a/tests/ui/auxiliary/external_item.rs b/tests/ui/auxiliary/external_item.rs
index ca4bc369e44..621e18f5c01 100644
--- a/tests/ui/auxiliary/external_item.rs
+++ b/tests/ui/auxiliary/external_item.rs
@@ -4,4 +4,4 @@ impl _ExternalStruct {
     pub fn _foo(self) {}
 }
 
-pub fn _exernal_foo() {}
+pub fn _external_foo() {}
diff --git a/tests/ui/used_underscore_items.rs b/tests/ui/used_underscore_items.rs
index 7e8289f1406..aecdd32693c 100644
--- a/tests/ui/used_underscore_items.rs
+++ b/tests/ui/used_underscore_items.rs
@@ -62,13 +62,13 @@ fn main() {
     //~^ used_underscore_items
 }
 
-// should not lint exteranl crate.
+// should not lint external crate.
 // user cannot control how others name their items
 fn external_item_call() {
     let foo_struct3 = external_item::_ExternalStruct {};
     foo_struct3._foo();
 
-    external_item::_exernal_foo();
+    external_item::_external_foo();
 }
 
 // should not lint foreign functions.