11error: this argument is a mutable reference, but not used mutably
2- --> $DIR/needless_pass_by_ref_mut.rs:7 :11
2+ --> $DIR/needless_pass_by_ref_mut.rs:12 :11
33 |
44LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
55 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
@@ -8,131 +8,131 @@ LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
88 = help: to override `-D warnings` add `#[allow(clippy::needless_pass_by_ref_mut)]`
99
1010error: this argument is a mutable reference, but not used mutably
11- --> $DIR/needless_pass_by_ref_mut.rs:32 :12
11+ --> $DIR/needless_pass_by_ref_mut.rs:37 :12
1212 |
1313LL | fn foo6(s: &mut Vec<u32>) {
1414 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
1515
1616error: this argument is a mutable reference, but not used mutably
17- --> $DIR/needless_pass_by_ref_mut.rs:45 :29
17+ --> $DIR/needless_pass_by_ref_mut.rs:50 :29
1818 |
1919LL | fn mushroom(&self, vec: &mut Vec<i32>) -> usize {
2020 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
2121
2222error: this argument is a mutable reference, but not used mutably
23- --> $DIR/needless_pass_by_ref_mut.rs:50 :31
23+ --> $DIR/needless_pass_by_ref_mut.rs:55 :31
2424 |
2525LL | fn badger(&mut self, vec: &mut Vec<i32>) -> usize {
2626 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
2727
2828error: this argument is a mutable reference, but not used mutably
29- --> $DIR/needless_pass_by_ref_mut.rs:127 :16
29+ --> $DIR/needless_pass_by_ref_mut.rs:132 :16
3030 |
3131LL | async fn a1(x: &mut i32) {
3232 | ^^^^^^^^ help: consider changing to: `&i32`
3333
3434error: this argument is a mutable reference, but not used mutably
35- --> $DIR/needless_pass_by_ref_mut.rs:131 :16
35+ --> $DIR/needless_pass_by_ref_mut.rs:136 :16
3636 |
3737LL | async fn a2(x: &mut i32, y: String) {
3838 | ^^^^^^^^ help: consider changing to: `&i32`
3939
4040error: this argument is a mutable reference, but not used mutably
41- --> $DIR/needless_pass_by_ref_mut.rs:135 :16
41+ --> $DIR/needless_pass_by_ref_mut.rs:140 :16
4242 |
4343LL | async fn a3(x: &mut i32, y: String, z: String) {
4444 | ^^^^^^^^ help: consider changing to: `&i32`
4545
4646error: this argument is a mutable reference, but not used mutably
47- --> $DIR/needless_pass_by_ref_mut.rs:139 :16
47+ --> $DIR/needless_pass_by_ref_mut.rs:144 :16
4848 |
4949LL | async fn a4(x: &mut i32, y: i32) {
5050 | ^^^^^^^^ help: consider changing to: `&i32`
5151
5252error: this argument is a mutable reference, but not used mutably
53- --> $DIR/needless_pass_by_ref_mut.rs:143 :24
53+ --> $DIR/needless_pass_by_ref_mut.rs:148 :24
5454 |
5555LL | async fn a5(x: i32, y: &mut i32) {
5656 | ^^^^^^^^ help: consider changing to: `&i32`
5757
5858error: this argument is a mutable reference, but not used mutably
59- --> $DIR/needless_pass_by_ref_mut.rs:147 :24
59+ --> $DIR/needless_pass_by_ref_mut.rs:152 :24
6060 |
6161LL | async fn a6(x: i32, y: &mut i32) {
6262 | ^^^^^^^^ help: consider changing to: `&i32`
6363
6464error: this argument is a mutable reference, but not used mutably
65- --> $DIR/needless_pass_by_ref_mut.rs:151 :32
65+ --> $DIR/needless_pass_by_ref_mut.rs:156 :32
6666 |
6767LL | async fn a7(x: i32, y: i32, z: &mut i32) {
6868 | ^^^^^^^^ help: consider changing to: `&i32`
6969
7070error: this argument is a mutable reference, but not used mutably
71- --> $DIR/needless_pass_by_ref_mut.rs:155 :24
71+ --> $DIR/needless_pass_by_ref_mut.rs:160 :24
7272 |
7373LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
7474 | ^^^^^^^^ help: consider changing to: `&i32`
7575
7676error: this argument is a mutable reference, but not used mutably
77- --> $DIR/needless_pass_by_ref_mut.rs:155 :45
77+ --> $DIR/needless_pass_by_ref_mut.rs:160 :45
7878 |
7979LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
8080 | ^^^^^^^^ help: consider changing to: `&i32`
8181
8282error: this argument is a mutable reference, but not used mutably
83- --> $DIR/needless_pass_by_ref_mut.rs:189 :16
83+ --> $DIR/needless_pass_by_ref_mut.rs:194 :16
8484 |
8585LL | fn cfg_warn(s: &mut u32) {}
8686 | ^^^^^^^^ help: consider changing to: `&u32`
8787 |
8888 = note: this is cfg-gated and may require further changes
8989
9090error: this argument is a mutable reference, but not used mutably
91- --> $DIR/needless_pass_by_ref_mut.rs:195 :20
91+ --> $DIR/needless_pass_by_ref_mut.rs:200 :20
9292 |
9393LL | fn cfg_warn(s: &mut u32) {}
9494 | ^^^^^^^^ help: consider changing to: `&u32`
9595 |
9696 = note: this is cfg-gated and may require further changes
9797
9898error: this argument is a mutable reference, but not used mutably
99- --> $DIR/needless_pass_by_ref_mut.rs:209 :39
99+ --> $DIR/needless_pass_by_ref_mut.rs:214 :39
100100 |
101101LL | async fn inner_async2(x: &mut i32, y: &mut u32) {
102102 | ^^^^^^^^ help: consider changing to: `&u32`
103103
104104error: this argument is a mutable reference, but not used mutably
105- --> $DIR/needless_pass_by_ref_mut.rs:217 :26
105+ --> $DIR/needless_pass_by_ref_mut.rs:222 :26
106106 |
107107LL | async fn inner_async3(x: &mut i32, y: &mut u32) {
108108 | ^^^^^^^^ help: consider changing to: `&i32`
109109
110110error: this argument is a mutable reference, but not used mutably
111- --> $DIR/needless_pass_by_ref_mut.rs:236 :34
111+ --> $DIR/needless_pass_by_ref_mut.rs:241 :34
112112 |
113113LL | pub async fn call_in_closure1(n: &mut str) {
114114 | ^^^^^^^^ help: consider changing to: `&str`
115115 |
116116 = warning: changing this function will impact semver compatibility
117117
118118error: this argument is a mutable reference, but not used mutably
119- --> $DIR/needless_pass_by_ref_mut.rs:248 :25
119+ --> $DIR/needless_pass_by_ref_mut.rs:253 :25
120120 |
121121LL | pub async fn closure(n: &mut usize) -> impl '_ + FnMut() {
122122 | ^^^^^^^^^^ help: consider changing to: `&usize`
123123 |
124124 = warning: changing this function will impact semver compatibility
125125
126126error: this argument is a mutable reference, but not used mutably
127- --> $DIR/needless_pass_by_ref_mut.rs:255 :20
127+ --> $DIR/needless_pass_by_ref_mut.rs:260 :20
128128 |
129129LL | pub fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
130130 | ^^^^^^^^^^ help: consider changing to: `&usize`
131131 |
132132 = warning: changing this function will impact semver compatibility
133133
134134error: this argument is a mutable reference, but not used mutably
135- --> $DIR/needless_pass_by_ref_mut.rs:266 :26
135+ --> $DIR/needless_pass_by_ref_mut.rs:271 :26
136136 |
137137LL | pub async fn closure4(n: &mut usize) {
138138 | ^^^^^^^^^^ help: consider changing to: `&usize`
0 commit comments