From 00d35eea2621ffb4ddfc69f7d5b2385b2ef53c21 Mon Sep 17 00:00:00 2001 From: sinkuu Date: Sat, 21 Oct 2017 10:07:24 +0900 Subject: [PATCH] Fix typo --- clippy_lints/src/types.rs | 4 ++-- tests/ui/implicit_hasher.stderr | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index a284392bf..44aab3917 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1561,7 +1561,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher { cx, IMPLICIT_HASHER, target.span(), - &format!("impl for `{}` should be generarized over different hashers", target.type_name()), + &format!("impl for `{}` should be generalized over different hashers", target.type_name()), move |db| { suggestion(cx, db, generics.span, generics_suggestion_span, target, ctr_vis); }, @@ -1595,7 +1595,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher { IMPLICIT_HASHER, target.span(), &format!( - "parameter of type `{}` should be generarized over different hashers", + "parameter of type `{}` should be generalized over different hashers", target.type_name() ), move |db| { diff --git a/tests/ui/implicit_hasher.stderr b/tests/ui/implicit_hasher.stderr index cc0bdc327..27d6e2cec 100644 --- a/tests/ui/implicit_hasher.stderr +++ b/tests/ui/implicit_hasher.stderr @@ -1,4 +1,4 @@ -error: impl for `HashMap` should be generarized over different hashers +error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:11:35 | 11 | impl Foo for HashMap { @@ -14,7 +14,7 @@ help: ...and use generic constructor 17 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) | ^^^^^^^^^^^^^^^^^^ -error: impl for `HashMap` should be generarized over different hashers +error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:20:36 | 20 | impl Foo for (HashMap,) { @@ -29,7 +29,7 @@ help: ...and use generic constructor 22 | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),)) | ^^^^^^^^^^^^^^^^^^ -error: impl for `HashMap` should be generarized over different hashers +error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:25:19 | 25 | impl Foo for HashMap { @@ -44,7 +44,7 @@ help: ...and use generic constructor 27 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) | ^^^^^^^^^^^^^^^^^^ -error: impl for `HashSet` should be generarized over different hashers +error: impl for `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:43:32 | 43 | impl Foo for HashSet { @@ -59,7 +59,7 @@ help: ...and use generic constructor 45 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default())) | ^^^^^^^^^^^^^^^^^^ -error: impl for `HashSet` should be generarized over different hashers +error: impl for `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:48:19 | 48 | impl Foo for HashSet { @@ -74,7 +74,7 @@ help: ...and use generic constructor 50 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default())) | ^^^^^^^^^^^^^^^^^^ -error: parameter of type `HashMap` should be generarized over different hashers +error: parameter of type `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:65:23 | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { @@ -85,7 +85,7 @@ help: consider adding a type parameter 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: parameter of type `HashSet` should be generarized over different hashers +error: parameter of type `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:65:53 | 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { @@ -96,7 +96,7 @@ help: consider adding a type parameter 65 | pub fn foo(_map: &mut HashMap, _set: &mut HashSet) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: impl for `HashMap` should be generarized over different hashers +error: impl for `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:70:43 | 70 | impl Foo for HashMap { @@ -114,7 +114,7 @@ help: ...and use generic constructor 72 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default())) | ^^^^^^^^^^^^^^^^^^ -error: parameter of type `HashMap` should be generarized over different hashers +error: parameter of type `HashMap` should be generalized over different hashers --> $DIR/implicit_hasher.rs:78:33 | 78 | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) { @@ -128,7 +128,7 @@ help: consider adding a type parameter 78 | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: parameter of type `HashSet` should be generarized over different hashers +error: parameter of type `HashSet` should be generalized over different hashers --> $DIR/implicit_hasher.rs:78:63 | 78 | pub fn $name(_map: &mut HashMap, _set: &mut HashSet) {