mirror of https://github.com/KaiserY/trpl-zh-cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
779 B
19 lines
779 B
$ cargo run
|
|
Compiling traits-example v0.1.0 (file:///projects/traits-example)
|
|
error[E0277]: `Point` doesn't implement `std::fmt::Display`
|
|
--> src/main.rs:20:6
|
|
|
|
|
20 | impl OutlinePrint for Point {}
|
|
| ^^^^^^^^^^^^ `Point` cannot be formatted with the default formatter
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for `Point`
|
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
|
note: required by a bound in `OutlinePrint`
|
|
--> src/main.rs:3:21
|
|
|
|
|
3 | trait OutlinePrint: fmt::Display {
|
|
| ^^^^^^^^^^^^ required by this bound in `OutlinePrint`
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|
|
error: could not compile `traits-example` due to previous error
|