2022-02-06 16:43:51 +08:00
$ cargo run
Compiling rectangles v0.1.0 (file:///projects/rectangles)
error[E0277]: `Rectangle` doesn't implement `std::fmt::Display`
--> src/main.rs:12:29
|
12 | println!("rect1 is {}", rect1);
| ^^^^^ `Rectangle` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `Rectangle`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
2023-01-16 17:34:52 +08:00
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
2022-02-06 16:43:51 +08:00
For more information about this error, try `rustc --explain E0277`.
2024-06-06 21:23:21 +08:00
error: could not compile `rectangles` (bin "rectangles") due to 1 previous error