Use get_parent_node instead of using spans

This commit is contained in:
Esteban Küber 2017-11-23 09:58:51 -08:00
parent 7c2526a9d7
commit 2461b7a264
4 changed files with 30 additions and 41 deletions

View file

@ -2,7 +2,7 @@ error: non-reference pattern used to match a reference (see issue #42640)
--> $DIR/suggestion.rs:12:12
|
12 | if let Some(y) = &Some(22) { //~ ERROR non-reference pattern
| ^^^^^^^ help: consider using: `&Some(y)`
| ^^^^^^^ help: consider using a reference: `&Some(y)`
|
= help: add #![feature(match_default_bindings)] to the crate attributes to enable

View file

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