2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2023-10-19 16:46:28 -05:00
|
|
|
#![feature(coroutines)]
|
2017-09-10 15:34:56 -05:00
|
|
|
|
|
|
|
enum Enum {
|
|
|
|
A(String),
|
|
|
|
B
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2023-10-19 16:46:28 -05:00
|
|
|
|| { //~ WARN unused coroutine that must be used
|
2017-09-10 15:34:56 -05:00
|
|
|
loop {
|
|
|
|
if let true = true {
|
|
|
|
match Enum::A(String::new()) {
|
|
|
|
Enum::A(_var) => {}
|
|
|
|
Enum::B => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
};
|
2017-12-29 12:25:40 -06:00
|
|
|
}
|