diff options
| author | Son <leson.phung@gmail.com> | 2018-08-20 12:04:08 +1000 |
|---|---|---|
| committer | Son <leson.phung@gmail.com> | 2018-08-20 12:04:08 +1000 |
| commit | 96282e186618691977192a6cace47f86d8a9aec5 (patch) | |
| tree | f9b411ea11314007d504e56fa37e466ed250a4ae /src/libstd/io | |
| parent | 6bf6d50a6ff7685b4aa09172d9d09f03f250da9d (diff) | |
| download | rust-96282e186618691977192a6cace47f86d8a9aec5.tar.gz rust-96282e186618691977192a6cace47f86d8a9aec5.zip | |
Add doc for impl From for Error
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 3e50988a68b..a6b46fa20b1 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -212,6 +212,12 @@ impl ErrorKind { /// the heap (for normal construction via Error::new) is too costly. #[stable(feature = "io_error_from_errorkind", since = "1.14.0")] impl From<ErrorKind> for Error { + /// Converts a [`ErrorKind`] into a [`Error`]. + /// + /// This conversion allocates a new error with simple repr. + /// + /// [`ErrorKind`]: enum.ErrorKind.html + /// [`Error`]: struct.Error.html #[inline] fn from(kind: ErrorKind) -> Error { Error { |
