blob: 5ecfaa37416ba834d86cea003275c328f48a9249 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
error: the function `takes_ref` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:56:15
|
LL | takes_ref(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
|
= note: `-D clippy::unnecessary-mut-passed` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_mut_passed)]`
error: the function `takes_ref_ref` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:58:19
|
LL | takes_ref_ref(&mut &42);
| ^^^^^^^^ help: remove this `mut`: `&&42`
error: the function `takes_ref_refmut` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:60:22
|
LL | takes_ref_refmut(&mut &mut 42);
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
error: the function `takes_raw_const` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:62:21
|
LL | takes_raw_const(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
error: the function `as_ptr` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:66:12
|
LL | as_ptr(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
error: the function `as_ptr` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:69:12
|
LL | as_ptr(&mut &42);
| ^^^^^^^^ help: remove this `mut`: `&&42`
error: the function `as_ptr` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:72:12
|
LL | as_ptr(&mut &mut 42);
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
error: the function `as_ptr` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:75:12
|
LL | as_ptr(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
error: the method `takes_ref` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:80:25
|
LL | my_struct.takes_ref(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
error: the method `takes_ref_ref` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:82:29
|
LL | my_struct.takes_ref_ref(&mut &42);
| ^^^^^^^^ help: remove this `mut`: `&&42`
error: the method `takes_ref_refmut` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:84:32
|
LL | my_struct.takes_ref_refmut(&mut &mut 42);
| ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42`
error: the method `takes_raw_const` doesn't need a mutable reference
--> tests/ui/mut_reference.rs:86:31
|
LL | my_struct.takes_raw_const(&mut 42);
| ^^^^^^^ help: remove this `mut`: `&42`
error: aborting due to 12 previous errors
|