summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs
blob: 2c63311e659781de89fc1d1358d2bb348cc8cd59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// check-pass
// Ensure that trailing semicolons cause warnings by default

macro_rules! foo {
    () => {
        true; //~  WARN trailing semicolon in macro
              //~| WARN this was previously
    }
}

fn main() {
    let _val = match true {
        true => false,
        _ => foo!()
    };
}