blob: 738b01e7ec1ee355cc962d74530a0f77229333d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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
|