diff options
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/mod.rs | 6 | ||||
| -rw-r--r-- | library/alloc/src/raw_vec.rs | 4 |
2 files changed, 5 insertions, 5 deletions
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<LayoutErr> for TryReserveError { +impl From<LayoutError> 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 a4240308bb3..522c5bcf5af 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}; @@ -472,7 +472,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> |
