mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
23 lines
859 B
Text
23 lines
859 B
Text
error: deref on an immutable reference
|
|
--> tests/ui/borrow_deref_ref.rs:13:17
|
|
|
|
|
LL | let b = &*a;
|
|
| ^^^ help: if you would like to reborrow, try removing `&*`: `a`
|
|
|
|
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::borrow_deref_ref)]`
|
|
|
|
error: deref on an immutable reference
|
|
--> tests/ui/borrow_deref_ref.rs:15:22
|
|
|
|
|
LL | let b = &mut &*bar(&12);
|
|
| ^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `bar(&12)`
|
|
|
|
error: deref on an immutable reference
|
|
--> tests/ui/borrow_deref_ref.rs:69:23
|
|
|
|
|
LL | let addr_y = &&*x as *const _ as usize; // assert ok
|
|
| ^^^ help: if you would like to reborrow, try removing `&*`: `x`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|