]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-phi.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / match-phi.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_assignments)]
4 // pretty-expanded FIXME #23616
5 #![allow(non_camel_case_types)]
6 #![allow(unused_variables)]
7
8 enum thing { a, b, c, }
9
10 fn foo<F>(it: F) where F: FnOnce(isize) { it(10); }
11
12 pub fn main() {
13     let mut x = true;
14     match thing::a {
15       thing::a => { x = true; foo(|_i| { } ) }
16       thing::b => { x = false; }
17       thing::c => { x = false; }
18     }
19 }