mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
18 lines
503 B
Text
18 lines
503 B
Text
error: deref on an immutable reference
|
|
--> $DIR/borrow_deref_ref_unfixable.rs:8:23
|
|
|
|
|
LL | let x: &str = &*s;
|
|
| ^^^
|
|
|
|
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
|
|
help: if you would like to reborrow, try removing `&*`
|
|
|
|
|
LL | let x: &str = s;
|
|
| ~
|
|
help: if you would like to deref, try using `&**`
|
|
|
|
|
LL | let x: &str = &**s;
|
|
| ~~~~
|
|
|
|
error: aborting due to previous error
|
|
|