]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/vec-macro-in-pattern.rs
Rollup merge of #106889 - scottmcm:windows-mut, r=cuviper
[rust.git] / tests / ui / macros / vec-macro-in-pattern.rs
1 // This is a regression test for #61933
2 // Verify that the vec![] macro may not be used in patterns
3 // and that the resulting diagnostic is actually helpful.
4
5 fn main() {
6     match Some(vec![42]) {
7         Some(vec![43]) => {} //~ ERROR arbitrary expressions aren't allowed in patterns
8         _ => {}
9     }
10 }