summary refs log tree commit diff
path: root/src/test/ui/issues/issue-39848.rs
blob: 5d1db7be857332b527d7ad21210258c9d7e5a14a (plain)
1
2
3
4
5
6
7
8
9
10
macro_rules! get_opt {
    ($tgt:expr, $field:ident) => {
        if $tgt.has_$field() {}
    }
}

fn main() {
    get_opt!(bar, foo);
    //~^ ERROR expected `{`, found `foo`
}