rust/tests/ui/lint/unused_parens_follow_ident.rs

18 lines
353 B
Rust

//@ 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() {}