]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs
Rollup merge of #87596 - jesyspa:issue-87318-hidden-whitespace, r=estebank
[rust.git] / src / test / ui / lint / semicolon-in-expressions-from-macros / warn-semicolon-in-expressions-from-macros.rs
1 // check-pass
2 // Ensure that trailing semicolons cause warnings by default
3
4 macro_rules! foo {
5     () => {
6         true; //~  WARN trailing semicolon in macro
7               //~| WARN this was previously
8     }
9 }
10
11 fn main() {
12     let _val = match true {
13         true => false,
14         _ => foo!()
15     };
16 }