Fix suggestions for &a: T parameters
Previously we were suggesting stuff like `fn f( &u32) {}`
This commit is contained in:
parent
f19ccc2e8d
commit
e9d49b2bfc
12 changed files with 476 additions and 88 deletions
|
|
@ -5,10 +5,14 @@ LL | for ((_, _), (&mut c, _)) in &mut map {
|
|||
| ^^^^^^ -------- this is an iterator with items of type `(&(char, char), &mut (char, char))`
|
||||
| |
|
||||
| expected `char`, found `&mut _`
|
||||
| help: you can probably remove the explicit borrow: `c`
|
||||
|
|
||||
= note: expected type `char`
|
||||
found mutable reference `&mut _`
|
||||
help: consider removing `&mut` from the pattern
|
||||
|
|
||||
LL - for ((_, _), (&mut c, _)) in &mut map {
|
||||
LL + for ((_, _), (c, _)) in &mut map {
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/for-loop-bad-item.rs:14:14
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue