// https://github.com/rust-lang/rust/issues/57781 //@ run-pass use std::cell::UnsafeCell; use std::collections::HashMap; struct OnceCell { _value: UnsafeCell>, } impl OnceCell { const INIT: OnceCell = OnceCell { _value: UnsafeCell::new(None), }; } pub fn crash() { let _ = OnceCell::>::INIT; } fn main() {}