Removes Default for Box<Path>.

This commit is contained in:
Clar Charr 2017-03-15 01:15:27 -04:00
parent 11a33760ec
commit 0739ecec61

View File

@ -1224,14 +1224,6 @@ impl Into<Box<Path>> for PathBuf {
}
}
#[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 @@ mod tests {
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());
}
}