Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Nov 25, 2017
1 parent 2461b7a commit 15dfd7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/test/ui/suggestions/dont-suggest-dereference-on-arg.rs
Expand Up @@ -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

Expand Down

0 comments on commit 15dfd7e

Please sign in to comment.