about summary refs log tree commit diff
path: root/tests/ui/lint/unused_parens_follow_ident.rs
blob: 32a163345b2cc7376d5ed4690670d8b493497ecb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ run-rustfix

#![deny(unused_parens)]

macro_rules! wrap {
    ($name:ident $arg:expr) => {
        $name($arg);
    };
}

fn main() {
    wrap!(unary(routine())); //~ ERROR unnecessary parentheses around function argument
    wrap!(unary (routine())); //~ ERROR unnecessary parentheses around function argument
}

fn unary(_: ()) {}
fn routine() {}