@@ -76,31 +76,31 @@ impl fmt::Debug for Error {
7676#[ allow( dead_code) ]
7777impl Error {
7878 pub ( crate ) const INVALID_UTF8 : Self =
79- const_io_error ! ( ErrorKind :: InvalidData , "stream did not contain valid UTF-8" ) ;
79+ const_error ! ( ErrorKind :: InvalidData , "stream did not contain valid UTF-8" ) ;
8080
8181 pub ( crate ) const READ_EXACT_EOF : Self =
82- const_io_error ! ( ErrorKind :: UnexpectedEof , "failed to fill whole buffer" ) ;
82+ const_error ! ( ErrorKind :: UnexpectedEof , "failed to fill whole buffer" ) ;
8383
84- pub ( crate ) const UNKNOWN_THREAD_COUNT : Self = const_io_error ! (
84+ pub ( crate ) const UNKNOWN_THREAD_COUNT : Self = const_error ! (
8585 ErrorKind :: NotFound ,
8686 "The number of hardware threads is not known for the target platform"
8787 ) ;
8888
8989 pub ( crate ) const UNSUPPORTED_PLATFORM : Self =
90- const_io_error ! ( ErrorKind :: Unsupported , "operation not supported on this platform" ) ;
90+ const_error ! ( ErrorKind :: Unsupported , "operation not supported on this platform" ) ;
9191
9292 pub ( crate ) const WRITE_ALL_EOF : Self =
93- const_io_error ! ( ErrorKind :: WriteZero , "failed to write whole buffer" ) ;
93+ const_error ! ( ErrorKind :: WriteZero , "failed to write whole buffer" ) ;
9494
9595 pub ( crate ) const ZERO_TIMEOUT : Self =
96- const_io_error ! ( ErrorKind :: InvalidInput , "cannot set a 0 duration timeout" ) ;
96+ const_error ! ( ErrorKind :: InvalidInput , "cannot set a 0 duration timeout" ) ;
9797}
9898
9999#[ stable( feature = "rust1" , since = "1.0.0" ) ]
100100impl From < alloc:: ffi:: NulError > for Error {
101101 /// Converts a [`alloc::ffi::NulError`] into a [`Error`].
102102 fn from ( _: alloc:: ffi:: NulError ) -> Error {
103- const_io_error ! ( ErrorKind :: InvalidInput , "data provided contains a nul byte" )
103+ const_error ! ( ErrorKind :: InvalidInput , "data provided contains a nul byte" )
104104 }
105105}
106106
@@ -603,8 +603,8 @@ impl Error {
603603 ///
604604 /// This function does not allocate.
605605 ///
606- /// You should not use this directly, and instead use the `const_io_error !`
607- /// macro: `io::const_io_error !(ErrorKind::Something, "some_message")`.
606+ /// You should not use this directly, and instead use the `const_error !`
607+ /// macro: `io::const_error !(ErrorKind::Something, "some_message")`.
608608 ///
609609 /// This function should maybe change to `from_static_message<const MSG: &'static
610610 /// str>(kind: ErrorKind)` in the future, when const generics allow that.
0 commit comments