Skip to content

Commit 54f4aea

Browse files
committed
Fix few typos
1 parent 60a978d commit 54f4aea

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clippy_lints/src/disallowed_macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ pub struct DisallowedMacros {
7171

7272
// When a macro is disallowed in an early pass, it's stored
7373
// and emitted during the late pass. This happens for attributes.
74-
earlies: AttrStorage,
74+
earliest: AttrStorage,
7575
}
7676

7777
impl DisallowedMacros {
78-
pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, earlies: AttrStorage) -> Self {
78+
pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, earliest: AttrStorage) -> Self {
7979
let (disallowed, _) = create_disallowed_map(
8080
tcx,
8181
&conf.disallowed_macros,
@@ -88,7 +88,7 @@ impl DisallowedMacros {
8888
disallowed,
8989
seen: FxHashSet::default(),
9090
derive_src: None,
91-
earlies,
91+
earliest,
9292
}
9393
}
9494

@@ -129,7 +129,7 @@ impl_lint_pass!(DisallowedMacros => [DISALLOWED_MACROS]);
129129
impl LateLintPass<'_> for DisallowedMacros {
130130
fn check_crate(&mut self, cx: &LateContext<'_>) {
131131
// once we check a crate in the late pass we can emit the early pass lints
132-
if let Some(attr_spans) = self.earlies.clone().0.get() {
132+
if let Some(attr_spans) = self.earliest.clone().0.get() {
133133
for span in attr_spans {
134134
self.check(cx, *span, None);
135135
}

tests/ui/auxiliary/external_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ impl _ExternalStruct {
44
pub fn _foo(self) {}
55
}
66

7-
pub fn _exernal_foo() {}
7+
pub fn _external_foo() {}

tests/ui/used_underscore_items.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ fn main() {
6262
//~^ used_underscore_items
6363
}
6464

65-
// should not lint exteranl crate.
65+
// should not lint external crate.
6666
// user cannot control how others name their items
6767
fn external_item_call() {
6868
let foo_struct3 = external_item::_ExternalStruct {};
6969
foo_struct3._foo();
7070

71-
external_item::_exernal_foo();
71+
external_item::_external_foo();
7272
}
7373

7474
// should not lint foreign functions.

0 commit comments

Comments
 (0)