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.
13 lines
476 B
13 lines
476 B
$ cargo run
|
|
Compiling traits-example v0.1.0 (file:///projects/traits-example)
|
|
error[E0283]: type annotations needed
|
|
--> src/main.rs:20:43
|
|
|
|
|
20 | println!("A baby dog is called a {}", Animal::baby_name());
|
|
| ^^^^^^^^^^^^^^^^^ cannot infer type
|
|
|
|
|
= note: cannot satisfy `_: Animal`
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|
|
error: could not compile `traits-example` due to previous error
|