Is trait std::error::Error moving to core::error::Error?

Hi there,

I'd like to improve my error handling in no_std development and found the Error trait convenient to abstract different Error types. However, this is only available in std and I'm wondering why this is so. Are there plans to move it to the core?

The libcore contains bare minimum types which are needed to make the language works. For example, without traits Iterator and IntoIterator the for-loop cannot works so they're in the libcore. But well, the language can works without IO operations, though it may not that useful :P.

But I agree it would be convenient to allow to use such standard io types in no_std context. I think we can separate those types from the libstd and forms a new builtin crate like we did on liballoc. Maybe libio? But it definitely needs a new RFC.

1 Like

It can't be moved below liballoc without breaking a trait implementation for Box.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.