rust/tests/ui/coroutine/match-bindings.rs
2024-02-16 20:02:50 +00:00

24 lines
400 B
Rust

//@ run-pass
#![allow(dead_code)]
#![feature(coroutines)]
enum Enum {
A(String),
B
}
fn main() {
|| { //~ WARN unused coroutine that must be used
loop {
if let true = true {
match Enum::A(String::new()) {
Enum::A(_var) => {}
Enum::B => {}
}
}
yield;
}
};
}