]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-8898.rs
3 fn assert_repr_eq
<T
: std
::fmt
::Debug
>(obj
: T
, expected
: String
) {
4 assert_eq
!(expected
, format
!("{:?}", obj
));
9 let tf
= [true, false];
13 assert_repr_eq(&abc
[..], "[1, 2, 3]".to_string());
14 assert_repr_eq(&tf
[..], "[true, false]".to_string());
15 assert_repr_eq(&x
[..], "[(), ()]".to_string());
16 assert_repr_eq(slice
, "[()]".to_string());
17 assert_repr_eq(&x
[..], "[(), ()]".to_string());