From bf0adc3c36c255fd4dab690f9bdc369daf3e8825 Mon Sep 17 00:00:00 2001 From: Jacob Hughes Date: Thu, 24 Sep 2020 23:48:26 -0400 Subject: Rename LayoutErr to LayoutError outside of core --- library/alloc/src/collections/mod.rs | 6 +++--- library/alloc/src/raw_vec.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'library/alloc') diff --git a/library/alloc/src/collections/mod.rs b/library/alloc/src/collections/mod.rs index 6b21e54f66a..8213e904fba 100644 --- a/library/alloc/src/collections/mod.rs +++ b/library/alloc/src/collections/mod.rs @@ -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 for TryReserveError { +impl From for TryReserveError { #[inline] - fn from(_: LayoutErr) -> Self { + fn from(_: LayoutError) -> Self { TryReserveError::CapacityOverflow } } diff --git a/library/alloc/src/raw_vec.rs b/library/alloc/src/raw_vec.rs index 1844d3ae004..70a4da687ce 100644 --- a/library/alloc/src/raw_vec.rs +++ b/library/alloc/src/raw_vec.rs @@ -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 RawVec { // significant, because the number of different `A` types seen in practice is // much smaller than the number of `T` types.) fn finish_grow( - new_layout: Result, + new_layout: Result, current_memory: Option<(NonNull, Layout)>, alloc: &mut A, ) -> Result, TryReserveError> -- cgit 1.4.1-3-g733a5