From 3df18c2432980f480686d2b5463d2ba22c507a5a Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Wed, 15 Mar 2017 08:18:17 -0700 Subject: [PATCH] Remove Default impl for Box --- src/libstd/path.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 49b01bc085373..b524af800c1c6 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1224,14 +1224,6 @@ impl Into> for PathBuf { } } -#[stable(feature = "box_default_extra", since = "1.17.0")] -impl Default for Box { - fn default() -> Box { - let boxed: Box = Default::default(); - unsafe { mem::transmute(boxed) } - } -} - #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized + AsRef> From<&'a T> for PathBuf { fn from(s: &'a T) -> PathBuf { @@ -3730,10 +3722,4 @@ mod tests { assert_eq!(&*boxed, &*path_buf); assert_eq!(&*path_buf, path); } - - #[test] - fn boxed_default() { - let boxed = >::default(); - assert!(boxed.as_os_str().is_empty()); - } }