It doesn't, you can not dynamically allocate memory in const functions even temporally. Rust was designed with the benefit of hindsight, so the well understood parts of const evaluation are stable and don't paint the syntax in a corner requiring `constexpr` and `consteval` keywords in the future.