diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-11-16 17:26:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 17:26:17 +0100 |
| commit | 5bbf75da78393343b155c8bfcf1ef9c0234d9ab1 (patch) | |
| tree | 4f16806e19dac4408029ca35ed628ef5a98a98f1 /library/std/src/error.rs | |
| parent | de0aa6169f0c7abbc8aa4d7e735f5da57a1e65ab (diff) | |
| parent | 8ff0c14dc50483d0b231f9bad3d1eec8556c3750 (diff) | |
Rollup merge of #77691 - exrook:rename-layouterr, r=KodrAus
Rename/Deprecate LayoutErr in favor of LayoutError Implements rust-lang/wg-allocators#73. This patch renames LayoutErr to LayoutError, and uses a type alias to support users using the old name. The new name will be instantly stable in release 1.49 (current nightly), the type alias will become deprecated in release 1.51 (so that when the current nightly is 1.51, 1.49 will be stable). This is the only error type in `std` that ends in `Err` rather than `Error`, if this PR lands all stdlib error types will end in `Error` :smiling_face_with_three_hearts:
Diffstat (limited to 'library/std/src/error.rs')
| -rw-r--r-- | library/std/src/error.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/error.rs b/library/std/src/error.rs index 5771ca758af..0044e59d697 100644 --- a/library/std/src/error.rs +++ b/library/std/src/error.rs @@ -19,7 +19,7 @@ mod tests; use core::array; use core::convert::Infallible; -use crate::alloc::{AllocError, LayoutErr}; +use crate::alloc::{AllocError, LayoutError}; use crate::any::TypeId; use crate::backtrace::Backtrace; use crate::borrow::Cow; @@ -390,7 +390,7 @@ impl Error for ! {} impl Error for AllocError {} #[stable(feature = "alloc_layout", since = "1.28.0")] -impl Error for LayoutErr {} +impl Error for LayoutError {} #[stable(feature = "rust1", since = "1.0.0")] impl Error for str::ParseBoolError { |
