Use snippet instead of pprinting statement
This commit is contained in:
parent
4bb6b4a5ed
commit
726aa1437f
4 changed files with 17 additions and 22 deletions
|
|
@ -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
|
||||
...
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue