summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/2229_closure_analysis/match/issue-87988.rs
blob: 27e7fabf11ab688fe725a9ebe1df65d5f004d5fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass
// edition:2021

const LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: i32 = 0x01;
const LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: i32 = 0x02;

pub fn hotplug_callback(event: i32) {
    let _ = || {
        match event {
            LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED => (),
            LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT => (),
            _ => (),
        };
    };
}

fn main() {
    hotplug_callback(1);
}