12
How to work with !Sized types in Rust
(sgued.fr)
This is outdatded. Mutexes don't allocate anymore. That's how Mutex::new
can be const.
Because when
T
is!Sized
, the layout is different, it looks more like the layout of&[T]
.