When writing code that uses Result
type, you may want different behavior for users and developers.
If you use anyhow you can get this for free! The catch is you need to use nightly and enable an environment variable:
RUST_BACKTRACE=1 cargo +nightly run
This is the tracking issue for stabilisation, and a PR to stabilise it. Looks like there is some disagreement about whether it needs to work in no_std before being stabilised or something like that.