Rename LayoutErr to LayoutError outside of core

This commit is contained in:
Jacob Hughes 2020-09-24 23:48:26 -04:00
parent a97abb40ab
commit bf0adc3c36
3 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ pub use linked_list::LinkedList;
#[doc(no_inline)]
pub use vec_deque::VecDeque;
use crate::alloc::{Layout, LayoutErr};
use crate::alloc::{Layout, LayoutError};
use core::fmt::Display;
/// The error type for `try_reserve` methods.
@ -71,9 +71,9 @@ pub enum TryReserveError {
}
#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
impl From<LayoutErr> for TryReserveError {
impl From<LayoutError> for TryReserveError {
#[inline]
fn from(_: LayoutErr) -> Self {
fn from(_: LayoutError) -> Self {
TryReserveError::CapacityOverflow
}
}

View File

@ -1,7 +1,7 @@
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
#![doc(hidden)]
use core::alloc::LayoutErr;
use core::alloc::LayoutError;
use core::cmp;
use core::intrinsics;
use core::mem::{self, ManuallyDrop, MaybeUninit};
@ -471,7 +471,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
// significant, because the number of different `A` types seen in practice is
// much smaller than the number of `T` types.)
fn finish_grow<A>(
new_layout: Result<Layout, LayoutErr>,
new_layout: Result<Layout, LayoutError>,
current_memory: Option<(NonNull<u8>, Layout)>,
alloc: &mut A,
) -> Result<NonNull<[u8]>, TryReserveError>

View File

@ -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 {