4 ms·
That feels a bit incomplete to me - that explains the language mechanism existing for using something different, but not std's lack of something more specific?
by OJFord 4y ago
That feels a bit incomplete to me - that explains the language mechanism existing for using something different, but not std's lack of something more specific?
As in, std::result could use std::error::Error to specialise core::result's more generic Result?
And it's barely any extra work at all for a maintainer of a crate with a `no_std` feature, since you can still use the same Result; it's no longer required that its Error type implements std's, but it can?
- steveklabnik 4y agoRust doesn't yet have specialization. It is used internally by the standard library, but only for optimizations, as far as I know.