Skip to content

Commit 3428da6

Browse files
committed
Fix typo missnamed -> misnamed
1 parent 3e2e81b commit 3428da6

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4188,6 +4188,7 @@ Released 2018-09-13
41884188
[`misaligned_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#misaligned_transmute
41894189
[`mismatched_target_os`]: https://rust-lang.github.io/rust-clippy/master/index.html#mismatched_target_os
41904190
[`mismatching_type_param_order`]: https://rust-lang.github.io/rust-clippy/master/index.html#mismatching_type_param_order
4191+
[`misnamed_getters`]: https://rust-lang.github.io/rust-clippy/master/index.html#misnamed_getters
41914192
[`misrefactored_assign_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#misrefactored_assign_op
41924193
[`missing_const_for_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
41934194
[`missing_docs_in_private_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
@@ -4198,7 +4199,6 @@ Released 2018-09-13
41984199
[`missing_safety_doc`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
41994200
[`missing_spin_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_spin_loop
42004201
[`missing_trait_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_trait_methods
4201-
[`missnamed_getters`]: https://rust-lang.github.io/rust-clippy/master/index.html#missnamed_getters
42024202
[`mistyped_literal_suffixes`]: https://rust-lang.github.io/rust-clippy/master/index.html#mistyped_literal_suffixes
42034203
[`mixed_case_hex_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#mixed_case_hex_literals
42044204
[`mixed_read_write_in_expression`]: https://rust-lang.github.io/rust-clippy/master/index.html#mixed_read_write_in_expression

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
177177
crate::from_raw_with_void_ptr::FROM_RAW_WITH_VOID_PTR_INFO,
178178
crate::from_str_radix_10::FROM_STR_RADIX_10_INFO,
179179
crate::functions::DOUBLE_MUST_USE_INFO,
180-
crate::functions::MISSNAMED_GETTERS_INFO,
180+
crate::functions::MISNAMED_GETTERS_INFO,
181181
crate::functions::MUST_USE_CANDIDATE_INFO,
182182
crate::functions::MUST_USE_UNIT_INFO,
183183
crate::functions::NOT_UNSAFE_PTR_ARG_DEREF_INFO,

clippy_lints/src/functions/missnamed_getters.rs renamed to clippy_lints/src/functions/misnamed_getters.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_lint::LateContext;
66
use rustc_middle::ty;
77
use rustc_span::Span;
88

9-
use super::MISSNAMED_GETTERS;
9+
use super::MISNAMED_GETTERS;
1010

1111
pub fn check_fn(
1212
cx: &LateContext<'_>,
@@ -111,7 +111,7 @@ pub fn check_fn(
111111
let sugg = format!("{snippet}{name}");
112112
span_lint_and_then(
113113
cx,
114-
MISSNAMED_GETTERS,
114+
MISNAMED_GETTERS,
115115
span,
116116
"getter function appears to return the wrong field",
117117
|diag| {

clippy_lints/src/functions/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod missnamed_getters;
1+
mod misnamed_getters;
22
mod must_use;
33
mod not_unsafe_ptr_arg_deref;
44
mod result;
@@ -297,7 +297,7 @@ declare_clippy_lint! {
297297
/// }
298298
/// ```
299299
#[clippy::version = "1.66.0"]
300-
pub MISSNAMED_GETTERS,
300+
pub MISNAMED_GETTERS,
301301
suspicious,
302302
"getter method returning the wrong field"
303303
}
@@ -328,7 +328,7 @@ impl_lint_pass!(Functions => [
328328
MUST_USE_CANDIDATE,
329329
RESULT_UNIT_ERR,
330330
RESULT_LARGE_ERR,
331-
MISSNAMED_GETTERS,
331+
MISNAMED_GETTERS,
332332
]);
333333

334334
impl<'tcx> LateLintPass<'tcx> for Functions {
@@ -344,7 +344,7 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
344344
too_many_arguments::check_fn(cx, kind, decl, span, hir_id, self.too_many_arguments_threshold);
345345
too_many_lines::check_fn(cx, kind, span, body, self.too_many_lines_threshold);
346346
not_unsafe_ptr_arg_deref::check_fn(cx, kind, decl, body, hir_id);
347-
missnamed_getters::check_fn(cx, kind, decl, body, span, hir_id);
347+
misnamed_getters::check_fn(cx, kind, decl, body, span, hir_id);
348348
}
349349

350350
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {

tests/ui/missnamed_getters.rs renamed to tests/ui/misnamed_getters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(unused)]
2-
#![warn(clippy::missnamed_getters)]
2+
#![warn(clippy::misnamed_getters)]
33

44
struct A {
55
a: u8,

tests/ui/missnamed_getters.stderr renamed to tests/ui/misnamed_getters.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error: getter function appears to return the wrong field
2-
--> $DIR/missnamed_getters.rs:11:5
2+
--> $DIR/misnamed_getters.rs:11:5
33
|
44
LL | / fn a(&self) -> &u8 {
55
LL | | &self.b
66
| | ------- help: consider using: `&self.a`
77
LL | | }
88
| |_____^
99
|
10-
= note: `-D clippy::missnamed-getters` implied by `-D warnings`
10+
= note: `-D clippy::misnamed-getters` implied by `-D warnings`
1111

1212
error: getter function appears to return the wrong field
13-
--> $DIR/missnamed_getters.rs:14:5
13+
--> $DIR/misnamed_getters.rs:14:5
1414
|
1515
LL | / fn a_mut(&mut self) -> &mut u8 {
1616
LL | | &mut self.b
@@ -19,7 +19,7 @@ LL | | }
1919
| |_____^
2020

2121
error: getter function appears to return the wrong field
22-
--> $DIR/missnamed_getters.rs:18:5
22+
--> $DIR/misnamed_getters.rs:18:5
2323
|
2424
LL | / fn b(self) -> u8 {
2525
LL | | self.a
@@ -28,7 +28,7 @@ LL | | }
2828
| |_____^
2929

3030
error: getter function appears to return the wrong field
31-
--> $DIR/missnamed_getters.rs:22:5
31+
--> $DIR/misnamed_getters.rs:22:5
3232
|
3333
LL | / fn b_mut(&mut self) -> &mut u8 {
3434
LL | | &mut self.a
@@ -37,7 +37,7 @@ LL | | }
3737
| |_____^
3838

3939
error: getter function appears to return the wrong field
40-
--> $DIR/missnamed_getters.rs:26:5
40+
--> $DIR/misnamed_getters.rs:26:5
4141
|
4242
LL | / fn c(&self) -> &u8 {
4343
LL | | &self.b
@@ -46,7 +46,7 @@ LL | | }
4646
| |_____^
4747

4848
error: getter function appears to return the wrong field
49-
--> $DIR/missnamed_getters.rs:30:5
49+
--> $DIR/misnamed_getters.rs:30:5
5050
|
5151
LL | / fn c_mut(&mut self) -> &mut u8 {
5252
LL | | &mut self.a
@@ -55,7 +55,7 @@ LL | | }
5555
| |_____^
5656

5757
error: getter function appears to return the wrong field
58-
--> $DIR/missnamed_getters.rs:41:5
58+
--> $DIR/misnamed_getters.rs:41:5
5959
|
6060
LL | / unsafe fn a(&self) -> &u8 {
6161
LL | | &self.b
@@ -64,7 +64,7 @@ LL | | }
6464
| |_____^
6565

6666
error: getter function appears to return the wrong field
67-
--> $DIR/missnamed_getters.rs:44:5
67+
--> $DIR/misnamed_getters.rs:44:5
6868
|
6969
LL | / unsafe fn a_mut(&mut self) -> &mut u8 {
7070
LL | | &mut self.b
@@ -73,7 +73,7 @@ LL | | }
7373
| |_____^
7474

7575
error: getter function appears to return the wrong field
76-
--> $DIR/missnamed_getters.rs:48:5
76+
--> $DIR/misnamed_getters.rs:48:5
7777
|
7878
LL | / unsafe fn b(self) -> u8 {
7979
LL | | self.a
@@ -82,7 +82,7 @@ LL | | }
8282
| |_____^
8383

8484
error: getter function appears to return the wrong field
85-
--> $DIR/missnamed_getters.rs:52:5
85+
--> $DIR/misnamed_getters.rs:52:5
8686
|
8787
LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
8888
LL | | &mut self.a

0 commit comments

Comments
 (0)