Skip to content

Commit 15dfd7e

Browse files
committed
Fix test
1 parent 2461b7a commit 15dfd7e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/test/ui/suggestions/dont-suggest-dereference-on-arg.rs

+3
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ fn main() {
1414
let x = vec![(String::new(), String::new())];
1515
x.iter()
1616
.filter(|&(ref a, _)| foo(a))
17+
//~^ ERROR non-reference pattern used to match a reference
18+
//~| HELP consider using a reference
19+
//~| HELP add
1720
.collect();
1821
}

src/test/ui/suggestions/dont-suggest-dereference-on-arg.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: non-reference pattern used to match a reference (see issue #42640)
2-
--> $DIR/dont-suggest-dereference-on-arg.rs:16:19
2+
--> $DIR/dont-suggest-dereference-on-arg.rs:16:18
33
|
44
16 | .filter(|&(ref a, _)| foo(a))
5-
| ^^^^^^^^^^^ help: consider using a reference: `&&(ref k, _)`
5+
| ^^^^^^^^^^^ help: consider using a reference: `&&(ref a, _)`
66
|
77
= help: add #![feature(match_default_bindings)] to the crate attributes to enable
88

0 commit comments

Comments
 (0)