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` 🥰
This commit is contained in:
commit
5bbf75da78
5 changed files with 52 additions and 33 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue