2022-06-04 06:34:07 -05:00
|
|
|
error: deref on an immutable reference
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/borrow_deref_ref_unfixable.rs:9:23
|
2022-06-04 06:34:07 -05:00
|
|
|
|
|
|
|
|
LL | let x: &str = &*s;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::borrow_deref_ref)]`
|
2022-06-04 06:34:07 -05:00
|
|
|
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;
|
|
|
|
| ~~~~
|
|
|
|
|
2023-11-21 11:08:42 -06:00
|
|
|
error: aborting due to 1 previous error
|
2022-06-04 06:34:07 -05:00
|
|
|
|