Hacker News

Favorites Setup
Comment by steveklabnik | original | C for Rust programmers
[−]steveklabnik · 2026-10-10 Sat 19:47 UTC · link
The Rust stdlib has added those functions that return errors, and the types are parameterized by the allocator trait. The trait is coming to stable in the next release!
[−]smj-edison · 2026-10-10 Sat 20:44 UTC · link
Oh that's exciting! I knew about the allocator work, but I hadn't heard about error reporting for failed allocations, or that it was about to be stabilized.
[−]steveklabnik · 2026-10-10 Sat 21:42 UTC · link
To be specific, I’m talking about try_ variants of functions that allocate and return Result.

I’m not sure when those are becoming stable, but Rust for Linux has been driving a bunch of this work, in my understanding, so that’s helped a lot.