about summary refs log tree commit diff
path: root/src/libcore/alloc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/alloc.rs')
-rw-r--r--src/libcore/alloc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index 1ba4c641065..23532c61721 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -356,13 +356,13 @@ pub enum CollectionAllocErr {
     /// (usually `isize::MAX` bytes).
     CapacityOverflow,
     /// Error due to the allocator (see the `AllocErr` type's docs).
-    AllocErr(AllocErr),
+    AllocErr,
 }
 
 #[unstable(feature = "try_reserve", reason = "new API", issue="48043")]
 impl From<AllocErr> for CollectionAllocErr {
-    fn from(err: AllocErr) -> Self {
-        CollectionAllocErr::AllocErr(err)
+    fn from(AllocErr: AllocErr) -> Self {
+        CollectionAllocErr::AllocErr
     }
 }