disclaimer: not advocating for this
but is there any technical reason why &str and/or String don't impl std::error::Error?
I know that they can be converted to
Box<dyn Error> but that's really not the same thing
you cant use them as a source or coerce them to &dyn Errors
Someone asked me recently and the only things I could think of were "Maybe lifetimes maybe coherence maybe it's just too spooky"
the reason for
String: !Error is purely philosophical, not technical. https://github.com/rust-lang/rust/pull/23979#issuecomment-89079584
Makes sense, I imagine using Result<String, String> would be rather error prone