Closed
Description
Hi,
I think being able to do
static mut GLOBAL_LOCK: Mutex<Type> = Mutex::new(Type::new())
Is a very important feature, right now you have to do weird jumps with Option
/MaybeUninit
and Once
to then return a &'static Mutex<T>
.
In practice, the missing pieces here are: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/mutex.rs#L24 and #57349
alexcrichton Pointed out here #66823 (comment) that this also requires Box
. so that's another missing piece in cost fn for these to be usable in const fn's
I opened this Issue as part of: #57563