Skip to content

Commit

Permalink
Rename LayoutErr to LayoutError outside of core
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Hughes committed Oct 8, 2020
1 parent a97abb4 commit bf0adc3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions library/alloc/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/raw_vec.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit bf0adc3

Please sign in to comment.