File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 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+
15fn main ( ) { }
26
37mod should_lint {
Original file line number Diff line number Diff line change 11error: deref on an immutable reference
2- --> $DIR/borrow_deref_ref.rs:6 :17
2+ --> $DIR/borrow_deref_ref.rs:10 :17
33 |
44LL | let b = &*a;
55 | ^^^ help: if you would like to reborrow, try removing `&*`: `a`
66 |
77 = note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
88
99error: deref on an immutable reference
10- --> $DIR/borrow_deref_ref.rs:9 :23
10+ --> $DIR/borrow_deref_ref.rs:13 :23
1111 |
1212LL | let x: &str = &*s;
1313 | ^^^
@@ -22,13 +22,13 @@ LL | let x: &str = &**s;
2222 | ~~~~
2323
2424error: deref on an immutable reference
25- --> $DIR/borrow_deref_ref.rs:11 :22
25+ --> $DIR/borrow_deref_ref.rs:15 :22
2626 |
2727LL | let b = &mut &*bar(&12);
2828 | ^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `bar(&12)`
2929
3030error: deref on an immutable reference
31- --> $DIR/borrow_deref_ref.rs:54 :23
31+ --> $DIR/borrow_deref_ref.rs:58 :23
3232 |
3333LL | let addr_y = &&*x as *const _ as usize; // assert ok
3434 | ^^^ help: if you would like to reborrow, try removing `&*`: `x`
You can’t perform that action at this time.
0 commit comments