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
503 B
13 lines
503 B
$ cargo run
|
|
Compiling closure-example v0.1.0 (file:///projects/closure-example)
|
|
error[E0308]: mismatched types
|
|
--> src/main.rs:5:29
|
|
|
|
|
5 | let n = example_closure(5);
|
|
| ^- help: try using a conversion method: `.to_string()`
|
|
| |
|
|
| expected struct `String`, found integer
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|
|
error: could not compile `closure-example` due to previous error
|