2023-06-06 14:06:49 -05:00
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:7:11
|
2023-06-06 14:06:49 -05:00
|
|
|
|
|
|
|
|
LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
|
|
|
|
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-pass-by-ref-mut` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:32:12
|
2023-06-06 14:06:49 -05:00
|
|
|
|
|
|
|
|
LL | fn foo6(s: &mut Vec<u32>) {
|
|
|
|
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:45:29
|
2023-06-06 14:06:49 -05:00
|
|
|
|
|
|
|
|
LL | fn mushroom(&self, vec: &mut Vec<i32>) -> usize {
|
|
|
|
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:50:31
|
2023-06-06 14:06:49 -05:00
|
|
|
|
|
|
|
|
LL | fn badger(&mut self, vec: &mut Vec<i32>) -> usize {
|
|
|
|
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
|
|
|
|
|
2023-07-18 14:45:35 -05:00
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:127:16
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a1(x: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:131:16
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a2(x: &mut i32, y: String) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:135:16
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a3(x: &mut i32, y: String, z: String) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:139:16
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a4(x: &mut i32, y: i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:143:24
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a5(x: i32, y: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:147:24
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a6(x: i32, y: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:151:32
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a7(x: i32, y: i32, z: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:155:24
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
2023-07-21 09:14:13 -05:00
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:155:45
|
2023-07-18 14:45:35 -05:00
|
|
|
|
|
|
|
|
LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&i32`
|
|
|
|
|
2023-07-25 11:08:16 -05:00
|
|
|
error: this argument is a mutable reference, but not used mutably
|
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:189:16
|
|
|
|
|
|
|
|
|
LL | fn cfg_warn(s: &mut u32) {}
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&u32`
|
|
|
|
|
|
|
|
|
= note: this is cfg-gated and may require further changes
|
|
|
|
|
|
|
|
error: this argument is a mutable reference, but not used mutably
|
|
|
|
--> $DIR/needless_pass_by_ref_mut.rs:194:20
|
|
|
|
|
|
|
|
|
LL | fn cfg_warn(s: &mut u32) {}
|
|
|
|
| ^^^^^^^^ help: consider changing to: `&u32`
|
|
|
|
|
|
|
|
|
= note: this is cfg-gated and may require further changes
|
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
2023-06-06 14:06:49 -05:00
|
|
|
|