15 lines
208 B
Rust
15 lines
208 B
Rust
|
|
|
|
enum thing { a, b, c, }
|
|
|
|
fn foo(it: fn(int)) { it(10); }
|
|
|
|
fn main() {
|
|
let mut x = true;
|
|
match a {
|
|
a => { x = true; foo(|_i| { } ) }
|
|
b => { x = false; }
|
|
c => { x = false; }
|
|
}
|
|
}
|