Use snippet instead of pprinting statement

This commit is contained in:
Esteban Küber 2019-07-12 14:01:13 -07:00
parent 4bb6b4a5ed
commit 726aa1437f
4 changed files with 17 additions and 22 deletions

View file

@ -2,7 +2,7 @@ error: expected `{`, found `foo`
--> $DIR/issue-39848.rs:8:19
|
LL | if $tgt.has_$field() {}
| -- - help: try placing this code inside a block: `{ foo(); }`
| -- - help: try placing this code inside a block: `{ ) }`
| |
| this `if` statement has a condition, but no block
...

View file

@ -11,7 +11,7 @@ LL | if true 'b: {}
| -- ^^----
| | |
| | expected `{`
| | help: try placing this code inside a block: `{ 'b: { } }`
| | help: try placing this code inside a block: `{ 'b: {} }`
| this `if` statement has a condition, but no block
error: expected `{`, found `'b`
@ -21,7 +21,7 @@ LL | if true {} else 'b: {}
| ^^----
| |
| expected `{`
| help: try placing this code inside a block: `{ 'b: { } }`
| help: try placing this code inside a block: `{ 'b: {} }`
error: expected one of `.`, `?`, `{`, or an operator, found `'b`
--> $DIR/label_break_value_illegal_uses.rs:18:17