Panic-free-friendly standard library

When working with a code which is supposed to be panic-free (that is with zero panic machinery linked into the final binary), I periodically encounter functionality from the standard (core) library which does bring this machinery. When examining it in depth it usually becomes clear that this is totally unnecessary and can be rewritten in a panic-free-friendly fashion. Most of the issues are coming and recurring from the core::fmt, here are few examples:

Another one relating to async/await functionality (which can't be easily fixed because of how it is specified):

Now, I am not asking how to fix these specific issues, I wonder how we can change the approach the library functionality is written in a way that allows the downstream developer to decide how to handle their errors? On which level these guidelines are usually documented and how these can be influenced?

A while ago I took a stab at implementing an alternative form of the allocator API, experimenting with ideas like totally-safe-allocators (requiring a little overhead to prevent trying to deallocate with the wrong allocator). In the process, I decided to give the user total control over how errors are handled. Here's what that looks like in its current state (example usage).

The reality is that errors can happen in a lot (a lot) of places, and it's good to give downstream users the option to decide how those errors get handled. However, many of those users won't care, and forcing them to adds unnecessary verbosity (just look at how arcane my implementation of Box is!).

I would love to see a more flexible core/std, including one that's panic-free-friendly. However, I think the best option for that would be an easier path for swapping them out for alternatives that suit your needs... which is almost impossible, when you take into account dependencies.

My main point I guess is that the very same functionality can be written more carefully avoiding potentially panicking constructs. In many cases the panic is not even possible, but the optimizer just can't figure it out. This should be something anchored in the guidelines for development and code review.

The trouble then is that you've placed extra burden on the maintainers. They're already largely unpaid volunteers, and "your code must be panic-free if at all possible" is both deincentivizing and hard to review. That makes it a hard sell to maintainers. I think the best option (unfair and unreliable though it is) is for individuals or companies that are invested in panic-free to do the checks and patches required.