rust/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs
2024-02-16 20:02:50 +00:00

17 lines
174 B
Rust

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