//@ run-pass use std::fmt; struct Array([T; N]); impl fmt::Debug for Array { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_list().entries(self.0.iter()).finish() } } fn main() { assert_eq!(format!("{:?}", Array([1, 2, 3])), "[1, 2, 3]"); }