Fix test
This commit is contained in:
parent
2461b7a264
commit
15dfd7eb61
2 changed files with 5 additions and 2 deletions
|
|
@ -14,5 +14,8 @@ fn main() {
|
|||
let x = vec![(String::new(), String::new())];
|
||||
x.iter()
|
||||
.filter(|&(ref a, _)| foo(a))
|
||||
//~^ ERROR non-reference pattern used to match a reference
|
||||
//~| HELP consider using a reference
|
||||
//~| HELP add
|
||||
.collect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: non-reference pattern used to match a reference (see issue #42640)
|
||||
--> $DIR/dont-suggest-dereference-on-arg.rs:16:19
|
||||
--> $DIR/dont-suggest-dereference-on-arg.rs:16:18
|
||||
|
|
||||
16 | .filter(|&(ref a, _)| foo(a))
|
||||
| ^^^^^^^^^^^ help: consider using a reference: `&&(ref k, _)`
|
||||
| ^^^^^^^^^^^ help: consider using a reference: `&&(ref a, _)`
|
||||
|
|
||||
= help: add #![feature(match_default_bindings)] to the crate attributes to enable
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue