about summary refs log tree commit diff
path: root/tests/mir-opt/async_closure_fake_read_for_by_move.rs
blob: e78671f5e9d56b3abdb4297d91cfe7d2c5e0e804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ edition:2021
// skip-filecheck

enum Foo {
    Bar,
    Baz,
}

// EMIT_MIR async_closure_fake_read_for_by_move.foo-{closure#0}-{closure#0}.built.after.mir
// EMIT_MIR async_closure_fake_read_for_by_move.foo-{closure#0}-{synthetic#0}.built.after.mir
fn foo(f: &Foo) {
    let x = async move || match f {
        Foo::Bar if true => {}
        _ => {}
    };
}

fn main() {}