Rollup merge of #51822 - estebank:suggest-more, r=nikomatsakis
Provide existing ref suggestions for more E0308 errors
This commit is contained in:
commit
e0179dfdce
4 changed files with 59 additions and 38 deletions
|
|
@ -14,7 +14,10 @@ LL | fn main() {
|
|||
| - expected `()` because of default return type
|
||||
...
|
||||
LL | let u: &str = if true { s[..2] } else { s };
|
||||
| ^^^^^^ expected &str, found str
|
||||
| ^^^^^^
|
||||
| |
|
||||
| expected &str, found str
|
||||
| help: consider borrowing here: `&s[..2]`
|
||||
|
|
||||
= note: expected type `&str`
|
||||
found type `str`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue