1 2 3 4 5 6 7 8 9 10 11 12 13
#![allow(dead_code)] struct Foo { secret: u64, } opaque_debug::implement!(Foo); #[test] fn debug_formatting() { let s = format!("{:?}", Foo { secret: 42 }); assert_eq!(s, "Foo { ... }"); }