mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Fix test
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user