Fix alloc::test::test_show
This commit is contained in:
parent
fdae75738b
commit
fccc75cf82
1 changed files with 4 additions and 4 deletions
|
@ -49,17 +49,17 @@ fn test_show() {
|
||||||
let b = Box::new(Test) as Box<dyn Any>;
|
let b = Box::new(Test) as Box<dyn Any>;
|
||||||
let a_str = format!("{:?}", a);
|
let a_str = format!("{:?}", a);
|
||||||
let b_str = format!("{:?}", b);
|
let b_str = format!("{:?}", b);
|
||||||
assert_eq!(a_str, "Any");
|
assert_eq!(a_str, "Any { .. }");
|
||||||
assert_eq!(b_str, "Any");
|
assert_eq!(b_str, "Any { .. }");
|
||||||
|
|
||||||
static EIGHT: usize = 8;
|
static EIGHT: usize = 8;
|
||||||
static TEST: Test = Test;
|
static TEST: Test = Test;
|
||||||
let a = &EIGHT as &dyn Any;
|
let a = &EIGHT as &dyn Any;
|
||||||
let b = &TEST as &dyn Any;
|
let b = &TEST as &dyn Any;
|
||||||
let s = format!("{:?}", a);
|
let s = format!("{:?}", a);
|
||||||
assert_eq!(s, "Any");
|
assert_eq!(s, "Any { .. }");
|
||||||
let s = format!("{:?}", b);
|
let s = format!("{:?}", b);
|
||||||
assert_eq!(s, "Any");
|
assert_eq!(s, "Any { .. }");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Reference in a new issue