]> git.proxmox.com Git - rustc.git/blob - tests/ui/generator/reinit-in-match-guard.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / generator / reinit-in-match-guard.rs
1 // build-pass
2
3 #![feature(generators)]
4
5 #![allow(unused_assignments, dead_code)]
6
7 fn main() {
8 let _ = || {
9 let mut x = vec![22_usize];
10 std::mem::drop(x);
11 match y() {
12 true if {
13 x = vec![];
14 false
15 } => {}
16 _ => {
17 yield;
18 }
19 }
20 };
21 }
22
23 fn y() -> bool {
24 true
25 }