File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ // run-rustfix
2
+
3
+ #![ allow( dead_code, unused_variables) ]
4
+
1
5
fn main ( ) { }
2
6
3
7
mod should_lint {
Original file line number Diff line number Diff line change 1
1
error: deref on an immutable reference
2
- --> $DIR/borrow_deref_ref.rs:6 :17
2
+ --> $DIR/borrow_deref_ref.rs:10 :17
3
3
|
4
4
LL | let b = &*a;
5
5
| ^^^ help: if you would like to reborrow, try removing `&*`: `a`
6
6
|
7
7
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
8
8
9
9
error: deref on an immutable reference
10
- --> $DIR/borrow_deref_ref.rs:9 :23
10
+ --> $DIR/borrow_deref_ref.rs:13 :23
11
11
|
12
12
LL | let x: &str = &*s;
13
13
| ^^^
@@ -22,13 +22,13 @@ LL | let x: &str = &**s;
22
22
| ~~~~
23
23
24
24
error: deref on an immutable reference
25
- --> $DIR/borrow_deref_ref.rs:11 :22
25
+ --> $DIR/borrow_deref_ref.rs:15 :22
26
26
|
27
27
LL | let b = &mut &*bar(&12);
28
28
| ^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `bar(&12)`
29
29
30
30
error: deref on an immutable reference
31
- --> $DIR/borrow_deref_ref.rs:54 :23
31
+ --> $DIR/borrow_deref_ref.rs:58 :23
32
32
|
33
33
LL | let addr_y = &&*x as *const _ as usize; // assert ok
34
34
| ^^^ help: if you would like to reborrow, try removing `&*`: `x`
You can’t perform that action at this time.
0 commit comments