#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::fmt; struct Foo(i32, String); impl fmt::Debug for Foo { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt.debug_tuple("Foo").field(&self.0).finish_non_exhaustive() } } fn main() { assert_eq!(format!("{:?}", Foo(10, "secret!".to_owned())), "Foo(10, ..)",); }