]> git.lizzy.rs Git - rust.git/commitdiff
Removes Default for Box<Path>.
authorClar Charr <clar@charr.xyz>
Wed, 15 Mar 2017 05:15:27 +0000 (01:15 -0400)
committerClar Charr <clar@charr.xyz>
Wed, 15 Mar 2017 15:36:13 +0000 (11:36 -0400)
src/libstd/path.rs

index 49b01bc0853732335af1274a22a92f45425f8157..b524af800c1c6693a9cc37ee0eac007996a87c1f 100644 (file)
@@ -1224,14 +1224,6 @@ fn into(self) -> Box<Path> {
     }
 }
 
-#[stable(feature = "box_default_extra", since = "1.17.0")]
-impl Default for Box<Path> {
-    fn default() -> Box<Path> {
-        let boxed: Box<OsStr> = Default::default();
-        unsafe { mem::transmute(boxed) }
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for PathBuf {
     fn from(s: &'a T) -> PathBuf {
@@ -3730,10 +3722,4 @@ fn into_boxed() {
         assert_eq!(&*boxed, &*path_buf);
         assert_eq!(&*path_buf, path);
     }
-
-    #[test]
-    fn boxed_default() {
-        let boxed = <Box<Path>>::default();
-        assert!(boxed.as_os_str().is_empty());
-    }
 }