about summary refs log tree commit diff
path: root/tests/ui/macros/vec-macro-in-pattern.rs
blob: 9b9a1edf54c9ec79f82019e09ad50693deb01b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// This is a regression test for #61933
// Verify that the vec![] macro may not be used in patterns
// and that the resulting diagnostic is actually helpful.

fn main() {
    match Some(vec![42]) {
        Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
        //~| ERROR found associated function
        //~| ERROR usage of qualified paths in this context is experimental
        _ => {}
    }
}