1 error: expected `{`, found `foo`
2 --> $DIR/issue-39848.rs:8:19
4 LL | if $tgt.has_$field() {}
5 | -- - help: try placing this code inside a block: `{ foo(); }`
7 | this `if` statement has a condition, but no block
9 LL | get_opt!(bar, foo);
12 error: aborting due to previous error