2018-07-15 14:11:54 -07:00
|
|
|
error: expected `{`, found `foo`
|
2020-02-24 13:04:13 +03:00
|
|
|
--> $DIR/issue-39848.rs:3:21
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
|
|
LL | if $tgt.has_$field() {}
|
2020-02-24 13:04:13 +03:00
|
|
|
| -- ^^^^^^--
|
|
|
|
|
| | |
|
|
|
|
|
| | expected `{`
|
|
|
|
|
| | help: try placing this code inside a block: `{ $field() }`
|
2019-12-06 23:23:30 +01:00
|
|
|
| this `if` expression has a condition, but no block
|
2018-07-15 14:11:54 -07:00
|
|
|
...
|
|
|
|
|
LL | get_opt!(bar, foo);
|
2021-10-14 13:28:28 -05:00
|
|
|
| ------------------ in this macro invocation
|
2020-02-24 13:04:13 +03:00
|
|
|
|
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `get_opt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-07-15 14:11:54 -07:00
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|