Skip to content

Commit 2f225d8

Browse files
authored
Merge pull request #2165 from sinkuu/typo
Fix typo
2 parents 76bb821 + 00d35ee commit 2f225d8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

clippy_lints/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher {
15611561
cx,
15621562
IMPLICIT_HASHER,
15631563
target.span(),
1564-
&format!("impl for `{}` should be generarized over different hashers", target.type_name()),
1564+
&format!("impl for `{}` should be generalized over different hashers", target.type_name()),
15651565
move |db| {
15661566
suggestion(cx, db, generics.span, generics_suggestion_span, target, ctr_vis);
15671567
},
@@ -1595,7 +1595,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher {
15951595
IMPLICIT_HASHER,
15961596
target.span(),
15971597
&format!(
1598-
"parameter of type `{}` should be generarized over different hashers",
1598+
"parameter of type `{}` should be generalized over different hashers",
15991599
target.type_name()
16001600
),
16011601
move |db| {

tests/ui/implicit_hasher.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: impl for `HashMap` should be generarized over different hashers
1+
error: impl for `HashMap` should be generalized over different hashers
22
--> $DIR/implicit_hasher.rs:11:35
33
|
44
11 | impl<K: Hash + Eq, V> Foo<i8> for HashMap<K, V> {
@@ -14,7 +14,7 @@ help: ...and use generic constructor
1414
17 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
1515
| ^^^^^^^^^^^^^^^^^^
1616

17-
error: impl for `HashMap` should be generarized over different hashers
17+
error: impl for `HashMap` should be generalized over different hashers
1818
--> $DIR/implicit_hasher.rs:20:36
1919
|
2020
20 | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
@@ -29,7 +29,7 @@ help: ...and use generic constructor
2929
22 | ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
3030
| ^^^^^^^^^^^^^^^^^^
3131

32-
error: impl for `HashMap` should be generarized over different hashers
32+
error: impl for `HashMap` should be generalized over different hashers
3333
--> $DIR/implicit_hasher.rs:25:19
3434
|
3535
25 | impl Foo<i16> for HashMap<String, String> {
@@ -44,7 +44,7 @@ help: ...and use generic constructor
4444
27 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
4545
| ^^^^^^^^^^^^^^^^^^
4646

47-
error: impl for `HashSet` should be generarized over different hashers
47+
error: impl for `HashSet` should be generalized over different hashers
4848
--> $DIR/implicit_hasher.rs:43:32
4949
|
5050
43 | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
@@ -59,7 +59,7 @@ help: ...and use generic constructor
5959
45 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
6060
| ^^^^^^^^^^^^^^^^^^
6161

62-
error: impl for `HashSet` should be generarized over different hashers
62+
error: impl for `HashSet` should be generalized over different hashers
6363
--> $DIR/implicit_hasher.rs:48:19
6464
|
6565
48 | impl Foo<i16> for HashSet<String> {
@@ -74,7 +74,7 @@ help: ...and use generic constructor
7474
50 | (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
7575
| ^^^^^^^^^^^^^^^^^^
7676

77-
error: parameter of type `HashMap` should be generarized over different hashers
77+
error: parameter of type `HashMap` should be generalized over different hashers
7878
--> $DIR/implicit_hasher.rs:65:23
7979
|
8080
65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
@@ -85,7 +85,7 @@ help: consider adding a type parameter
8585
65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
8686
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787

88-
error: parameter of type `HashSet` should be generarized over different hashers
88+
error: parameter of type `HashSet` should be generalized over different hashers
8989
--> $DIR/implicit_hasher.rs:65:53
9090
|
9191
65 | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
@@ -96,7 +96,7 @@ help: consider adding a type parameter
9696
65 | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {
9797
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9898

99-
error: impl for `HashMap` should be generarized over different hashers
99+
error: impl for `HashMap` should be generalized over different hashers
100100
--> $DIR/implicit_hasher.rs:70:43
101101
|
102102
70 | impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
@@ -114,7 +114,7 @@ help: ...and use generic constructor
114114
72 | (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
115115
| ^^^^^^^^^^^^^^^^^^
116116

117-
error: parameter of type `HashMap` should be generarized over different hashers
117+
error: parameter of type `HashMap` should be generalized over different hashers
118118
--> $DIR/implicit_hasher.rs:78:33
119119
|
120120
78 | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {
@@ -128,7 +128,7 @@ help: consider adding a type parameter
128128
78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {
129129
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130130

131-
error: parameter of type `HashSet` should be generarized over different hashers
131+
error: parameter of type `HashSet` should be generalized over different hashers
132132
--> $DIR/implicit_hasher.rs:78:63
133133
|
134134
78 | pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {

0 commit comments

Comments
 (0)