2022-06-01 10:32:26 -05:00
|
|
|
error: deref on an immutable reference
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/borrow_deref_ref_unfixable.rs:9:23
|
2022-06-01 10:32:26 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|