1// run-rustfix 2 3macro_rules! foo { 4 () => { 5 assert_eq!("A", "A"); 6 //~^ WARN trailing semicolon in macro 7 //~| WARN this was previously 8 //~| NOTE macro invocations at the end of a block 9 //~| NOTE to ignore the value produced by the macro 10 //~| NOTE for more information 11 //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default 12 assert_eq!("B", "B"); 13 } 14 //~^^ ERROR macro expansion ignores token `assert_eq` and any following 15 //~| NOTE the usage of `foo!` is likely invalid in expression context 16} 17 18fn main() { 19 foo!(); 20 //~^ NOTE caused by the macro expansion here 21 //~| NOTE in this expansion 22 //~| NOTE in this expansion 23 //~| NOTE in this expansion 24 //~| NOTE in this expansion 25 //~| NOTE in this expansion 26 //~| NOTE in this expansion 27} 28