]> git.lizzy.rs Git - rust.git/blob - src/test/ui/or-patterns/mismatched-bindings-async-fn.rs
Auto merge of #82864 - jyn514:short-circuit, r=GuillaumeGomez
[rust.git] / src / test / ui / or-patterns / mismatched-bindings-async-fn.rs
1 // Regression test for #71297
2 // edition:2018
3
4 async fn a((x | s): String) {}
5 //~^ ERROR variable `x` is not bound in all patterns
6 //~| ERROR variable `s` is not bound in all patterns
7
8 async fn b() {
9     let (x | s) = String::new();
10     //~^ ERROR variable `x` is not bound in all patterns
11     //~| ERROR variable `s` is not bound in all patterns
12 }
13
14 fn main() {}