Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- struct Foo { x: i64 }; let foo = Foo { x: 0 }; println!("{}", foo)
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0277]: `main::Foo` doesn't implement `std::fmt::Display`
- --> src/main.rs:6:71
- |
- 6 | struct Foo { x: i64 }; let foo = Foo { x: 0 }; println!("{}", foo)
- | ^^^ `main::Foo` cannot be formatted with the default formatter
- |
- = help: the trait `std::fmt::Display` is not implemented for `main::Foo`
- = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
- = note: required by `std::fmt::Display::fmt`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0277`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement