What would be really nice here are some default strategies for #[panic_fmt]
which could be easily stabilized.
You could imagine something like:
#[lang_default(panic_fmt, loop)]
…which goes into an infinite loop. Or if you got the abort intrinsic working:
#[lang_default(panic_fmt, abort)]
One of the no_std
environments I work in has a minimalist pseudo-libc that supports a few things like printf()
, abort()
, etc (although little else). Perhaps you could even have:
#[lang_default(panic_fmt, print)]