rust/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs
2024-02-26 21:47:10 +01:00

16 lines
275 B
Rust

// Issue #121647: recovery path leaving unemitted error behind
macro_rules! the_macro {
( $foo:stmt ; $bar:stmt ; ) => {
#[cfg()]
$foo //~ ERROR expected `;`, found `#`
#[cfg(bar)]
$bar
};
}
fn main() {
the_macro!( (); (); );
}