1
Fork 0
rust/src/test/ui/or-patterns/mismatched-bindings-async-fn.rs

17 lines
387 B
Rust
Raw Normal View History

// Regression test for #71297
// edition:2018
#![feature(or_patterns)]
async fn a((x | s): String) {}
//~^ ERROR variable `x` is not bound in all patterns
//~| ERROR variable `s` is not bound in all patterns
async fn b() {
let x | s = String::new();
//~^ ERROR variable `x` is not bound in all patterns
//~| ERROR variable `s` is not bound in all patterns
}
fn main() {}