Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. struct Foo(i32);
  2.  
  3. impl std::fmt::Debug for Foo where i32: std::fmt::Debug {
  4. fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
  5. write!(f, "{}", self.0)
  6. }
  7. }
  8.  
  9. fn main() {
  10. println!("{:?}", Foo(42));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement