]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/match/issue-87988.rs
Rollup merge of #107248 - erikdesjardins:addrspace, r=oli-obk
[rust.git] / tests / ui / closures / 2229_closure_analysis / match / issue-87988.rs
1 // run-pass
2 // edition:2021
3
4 const LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: i32 = 0x01;
5 const LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: i32 = 0x02;
6
7 pub fn hotplug_callback(event: i32) {
8     let _ = || {
9         match event {
10             LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED => (),
11             LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT => (),
12             _ => (),
13         };
14     };
15 }
16
17 fn main() {
18     hotplug_callback(1);
19 }