rust-clippy/tests/ui/borrow_deref_ref_unfixable.stderr
Nilstrieb c2c73189c8 Bless clippy tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

19 lines
583 B
Text

error: deref on an immutable reference
--> $DIR/borrow_deref_ref_unfixable.rs:9:23
|
LL | let x: &str = &*s;
| ^^^
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::borrow_deref_ref)]`
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 1 previous error