3 #![warn(print_stdout, use_debug)]
5 use std::fmt::{Debug, Display, Formatter, Result};
10 impl Display for Foo {
11 fn fmt(&self, f: &mut Formatter) -> Result {
12 write!(f, "{:?}", 43.1415)
17 fn fmt(&self, f: &mut Formatter) -> Result {
18 // ok, we can use `Debug` formatting in `Debug` implementations
19 write!(f, "{:?}", 42.718)
27 print!("Hello {}", "World");
29 print!("Hello {:?}", "World");
31 print!("Hello {:#?}", "#orld");