Fallout in libstd: remove impls now considered to conflict.

This commit is contained in:
Niko Matsakis
2015-03-30 17:50:31 -04:00
parent b0af587b64
commit 30b2d9e764
4 changed files with 12 additions and 17 deletions

View File

@@ -278,13 +278,6 @@ impl<T: fmt::Debug + ?Sized> fmt::Debug for Box<T> {
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for Box<Any> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.pad("Box<Any>")
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> Deref for Box<T> {
type Target = T;

View File

@@ -55,17 +55,17 @@ fn test_show() {
let b = Box::new(Test) as Box<Any>;
let a_str = format!("{:?}", a);
let b_str = format!("{:?}", b);
assert_eq!(a_str, "Box<Any>");
assert_eq!(b_str, "Box<Any>");
assert_eq!(a_str, "Any");
assert_eq!(b_str, "Any");
static EIGHT: usize = 8;
static TEST: Test = Test;
let a = &EIGHT as &Any;
let b = &TEST as &Any;
let s = format!("{:?}", a);
assert_eq!(s, "&Any");
assert_eq!(s, "Any");
let s = format!("{:?}", b);
assert_eq!(s, "&Any");
assert_eq!(s, "Any");
}
#[test]