File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change
1
+ // This test can't work with run-rustfix because it needs two passes of test+fix
2
+
1
3
#[ warn( clippy:: deref_addrof) ]
2
- #[ allow( unused_variables) ]
4
+ #[ allow( unused_variables, unused_mut ) ]
3
5
fn main ( ) {
4
6
let a = 10 ;
5
7
Original file line number Diff line number Diff line change 1
1
error: immediately dereferencing a reference
2
- --> $DIR/deref_addrof_double_trigger.rs:8 :14
2
+ --> $DIR/deref_addrof_double_trigger.rs:10 :14
3
3
|
4
4
LL | let b = **&&a;
5
5
| ^^^^ help: try this: `&a`
6
6
|
7
7
= note: `-D clippy::deref-addrof` implied by `-D warnings`
8
8
9
9
error: immediately dereferencing a reference
10
- --> $DIR/deref_addrof_double_trigger.rs:12 :17
10
+ --> $DIR/deref_addrof_double_trigger.rs:14 :17
11
11
|
12
12
LL | let y = *&mut x;
13
13
| ^^^^^^^ help: try this: `x`
14
14
15
15
error: immediately dereferencing a reference
16
- --> $DIR/deref_addrof_double_trigger.rs:19 :18
16
+ --> $DIR/deref_addrof_double_trigger.rs:21 :18
17
17
|
18
18
LL | let y = **&mut &mut x;
19
19
| ^^^^^^^^^^^^ help: try this: `&mut x`
You can’t perform that action at this time.
0 commit comments