io: Require core::error::Error for the Error trait

This commit is contained in:
chrysn 2025-08-03 10:11:39 +02:00
parent 3f83185caf
commit d02f6db110

View File

@ -176,7 +176,7 @@ impl From<std::io::ErrorKind> for ErrorKind {
///
/// This trait allows generic code to do limited inspecting of errors,
/// to react differently to different kinds.
pub trait Error: fmt::Debug {
pub trait Error: fmt::Debug + core::error::Error {
/// Get the kind of this error.
fn kind(&self) -> ErrorKind;
}