mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Fix alloc::test::test_show
This commit is contained in:
parent
fdae75738b
commit
fccc75cf82
@ -49,17 +49,17 @@ fn test_show() {
|
||||
let b = Box::new(Test) as Box<dyn Any>;
|
||||
let a_str = format!("{:?}", a);
|
||||
let b_str = format!("{:?}", b);
|
||||
assert_eq!(a_str, "Any");
|
||||
assert_eq!(b_str, "Any");
|
||||
assert_eq!(a_str, "Any { .. }");
|
||||
assert_eq!(b_str, "Any { .. }");
|
||||
|
||||
static EIGHT: usize = 8;
|
||||
static TEST: Test = Test;
|
||||
let a = &EIGHT as &dyn Any;
|
||||
let b = &TEST as &dyn 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]
|
||||
|
Loading…
Reference in New Issue
Block a user