rust/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs
2023-01-11 09:32:08 +00:00

17 lines
172 B
Rust

// edition:2021
// check-pass
union Union {
value: u64,
}
fn main() {
let u = Union { value: 42 };
let c = || {
unsafe { u.value }
};
c();
}