Skip to content

Commit bf0adc3

Browse files
author
Jacob Hughes
committed
Rename LayoutErr to LayoutError outside of core
1 parent a97abb4 commit bf0adc3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

library/alloc/src/collections/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub use linked_list::LinkedList;
4141
#[doc(no_inline)]
4242
pub use vec_deque::VecDeque;
4343

44-
use crate::alloc::{Layout, LayoutErr};
44+
use crate::alloc::{Layout, LayoutError};
4545
use core::fmt::Display;
4646

4747
/// The error type for `try_reserve` methods.
@@ -71,9 +71,9 @@ pub enum TryReserveError {
7171
}
7272

7373
#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
74-
impl From<LayoutErr> for TryReserveError {
74+
impl From<LayoutError> for TryReserveError {
7575
#[inline]
76-
fn from(_: LayoutErr) -> Self {
76+
fn from(_: LayoutError) -> Self {
7777
TryReserveError::CapacityOverflow
7878
}
7979
}

library/alloc/src/raw_vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
22
#![doc(hidden)]
33

4-
use core::alloc::LayoutErr;
4+
use core::alloc::LayoutError;
55
use core::cmp;
66
use core::intrinsics;
77
use core::mem::{self, ManuallyDrop, MaybeUninit};
@@ -471,7 +471,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
471471
// significant, because the number of different `A` types seen in practice is
472472
// much smaller than the number of `T` types.)
473473
fn finish_grow<A>(
474-
new_layout: Result<Layout, LayoutErr>,
474+
new_layout: Result<Layout, LayoutError>,
475475
current_memory: Option<(NonNull<u8>, Layout)>,
476476
alloc: &mut A,
477477
) -> Result<NonNull<[u8]>, TryReserveError>

library/std/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod tests;
1919
use core::array;
2020
use core::convert::Infallible;
2121

22-
use crate::alloc::{AllocError, LayoutErr};
22+
use crate::alloc::{AllocError, LayoutError};
2323
use crate::any::TypeId;
2424
use crate::backtrace::Backtrace;
2525
use crate::borrow::Cow;
@@ -390,7 +390,7 @@ impl Error for ! {}
390390
impl Error for AllocError {}
391391

392392
#[stable(feature = "alloc_layout", since = "1.28.0")]
393-
impl Error for LayoutErr {}
393+
impl Error for LayoutError {}
394394

395395
#[stable(feature = "rust1", since = "1.0.0")]
396396
impl Error for str::ParseBoolError {

0 commit comments

Comments
 (0)