rust/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
402 B
Rust
Raw Normal View History

2021-08-12 20:29:04 -05:00
// 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);
}