Skip to content

Commit 0ed31be

Browse files
committed
rename mut_reference to unnecessary_mut_passed
The lint was probably renamed at some point, but the files weren't. This made it annoying to search for the lint.
1 parent d99cf5c commit 0ed31be

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
535535
crate::multiple_unsafe_ops_per_block::MULTIPLE_UNSAFE_OPS_PER_BLOCK_INFO,
536536
crate::mut_key::MUTABLE_KEY_TYPE_INFO,
537537
crate::mut_mut::MUT_MUT_INFO,
538-
crate::mut_reference::UNNECESSARY_MUT_PASSED_INFO,
539538
crate::mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL_INFO,
540539
crate::mutex_atomic::MUTEX_ATOMIC_INFO,
541540
crate::mutex_atomic::MUTEX_INTEGER_INFO,
@@ -752,6 +751,7 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
752751
crate::unnecessary_box_returns::UNNECESSARY_BOX_RETURNS_INFO,
753752
crate::unnecessary_literal_bound::UNNECESSARY_LITERAL_BOUND_INFO,
754753
crate::unnecessary_map_on_constructor::UNNECESSARY_MAP_ON_CONSTRUCTOR_INFO,
754+
crate::unnecessary_mut_passed::UNNECESSARY_MUT_PASSED_INFO,
755755
crate::unnecessary_owned_empty_strings::UNNECESSARY_OWNED_EMPTY_STRINGS_INFO,
756756
crate::unnecessary_self_imports::UNNECESSARY_SELF_IMPORTS_INFO,
757757
crate::unnecessary_semicolon::UNNECESSARY_SEMICOLON_INFO,

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ mod multiple_bound_locations;
253253
mod multiple_unsafe_ops_per_block;
254254
mod mut_key;
255255
mod mut_mut;
256-
mod mut_reference;
257256
mod mutable_debug_assertion;
258257
mod mutex_atomic;
259258
mod needless_arbitrary_self_type;
@@ -375,6 +374,7 @@ mod unit_types;
375374
mod unnecessary_box_returns;
376375
mod unnecessary_literal_bound;
377376
mod unnecessary_map_on_constructor;
377+
mod unnecessary_mut_passed;
378378
mod unnecessary_owned_empty_strings;
379379
mod unnecessary_self_imports;
380380
mod unnecessary_semicolon;
@@ -483,7 +483,7 @@ pub fn register_lint_passes(store: &mut rustc_lint::LintStore, conf: &'static Co
483483
store.register_late_pass(|_| Box::new(misc::LintPass));
484484
store.register_late_pass(|_| Box::new(eta_reduction::EtaReduction));
485485
store.register_late_pass(|_| Box::new(mut_mut::MutMut));
486-
store.register_late_pass(|_| Box::new(mut_reference::UnnecessaryMutPassed));
486+
store.register_late_pass(|_| Box::new(unnecessary_mut_passed::UnnecessaryMutPassed));
487487
store.register_late_pass(|_| Box::<significant_drop_tightening::SignificantDropTightening<'_>>::default());
488488
store.register_late_pass(|_| Box::new(len_zero::LenZero));
489489
store.register_late_pass(move |_| Box::new(attrs::Attributes::new(conf)));
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/ui/mut_reference.stderr renamed to tests/ui/unnecessary_mut_passed.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the function `takes_ref` doesn't need a mutable reference
2-
--> tests/ui/mut_reference.rs:56:15
2+
--> tests/ui/unnecessary_mut_passed.rs:56:15
33
|
44
LL | takes_ref(&mut 42);
55
| ^^^^^^^ help: remove this `mut`: `&42`
@@ -8,67 +8,67 @@ LL | takes_ref(&mut 42);
88
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_mut_passed)]`
99

1010
error: the function `takes_ref_ref` doesn't need a mutable reference
11-
--> tests/ui/mut_reference.rs:58:19
11+
--> tests/ui/unnecessary_mut_passed.rs:58:19
1212
|
1313
LL | takes_ref_ref(&mut &42);
1414
| ^^^^^^^^ help: remove this `mut`: `&&42`
1515

1616
error: the function `takes_ref_refmut` doesn't need a mutable reference
17-
--> tests/ui/mut_reference.rs:60:22
17+
--> tests/ui/unnecessary_mut_passed.rs:60:22
1818
|
1919
LL | takes_ref_refmut(&mut &mut 42);
2020
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
2121

2222
error: the function `takes_raw_const` doesn't need a mutable reference
23-
--> tests/ui/mut_reference.rs:62:21
23+
--> tests/ui/unnecessary_mut_passed.rs:62:21
2424
|
2525
LL | takes_raw_const(&mut 42);
2626
| ^^^^^^^ help: remove this `mut`: `&42`
2727

2828
error: the function `as_ptr` doesn't need a mutable reference
29-
--> tests/ui/mut_reference.rs:66:12
29+
--> tests/ui/unnecessary_mut_passed.rs:66:12
3030
|
3131
LL | as_ptr(&mut 42);
3232
| ^^^^^^^ help: remove this `mut`: `&42`
3333

3434
error: the function `as_ptr` doesn't need a mutable reference
35-
--> tests/ui/mut_reference.rs:69:12
35+
--> tests/ui/unnecessary_mut_passed.rs:69:12
3636
|
3737
LL | as_ptr(&mut &42);
3838
| ^^^^^^^^ help: remove this `mut`: `&&42`
3939

4040
error: the function `as_ptr` doesn't need a mutable reference
41-
--> tests/ui/mut_reference.rs:72:12
41+
--> tests/ui/unnecessary_mut_passed.rs:72:12
4242
|
4343
LL | as_ptr(&mut &mut 42);
4444
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
4545

4646
error: the function `as_ptr` doesn't need a mutable reference
47-
--> tests/ui/mut_reference.rs:75:12
47+
--> tests/ui/unnecessary_mut_passed.rs:75:12
4848
|
4949
LL | as_ptr(&mut 42);
5050
| ^^^^^^^ help: remove this `mut`: `&42`
5151

5252
error: the method `takes_ref` doesn't need a mutable reference
53-
--> tests/ui/mut_reference.rs:80:25
53+
--> tests/ui/unnecessary_mut_passed.rs:80:25
5454
|
5555
LL | my_struct.takes_ref(&mut 42);
5656
| ^^^^^^^ help: remove this `mut`: `&42`
5757

5858
error: the method `takes_ref_ref` doesn't need a mutable reference
59-
--> tests/ui/mut_reference.rs:82:29
59+
--> tests/ui/unnecessary_mut_passed.rs:82:29
6060
|
6161
LL | my_struct.takes_ref_ref(&mut &42);
6262
| ^^^^^^^^ help: remove this `mut`: `&&42`
6363

6464
error: the method `takes_ref_refmut` doesn't need a mutable reference
65-
--> tests/ui/mut_reference.rs:84:32
65+
--> tests/ui/unnecessary_mut_passed.rs:84:32
6666
|
6767
LL | my_struct.takes_ref_refmut(&mut &mut 42);
6868
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
6969

7070
error: the method `takes_raw_const` doesn't need a mutable reference
71-
--> tests/ui/mut_reference.rs:86:31
71+
--> tests/ui/unnecessary_mut_passed.rs:86:31
7272
|
7373
LL | my_struct.takes_raw_const(&mut 42);
7474
| ^^^^^^^ help: remove this `mut`: `&42`

0 commit comments

Comments
 (0)