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
416 B
13 lines
416 B
3 years ago
|
$ cargo run
|
||
|
Compiling enums v0.1.0 (file:///projects/enums)
|
||
|
error[E0277]: cannot add `Option<i8>` to `i8`
|
||
|
--> src/main.rs:5:17
|
||
|
|
|
||
|
5 | let sum = x + y;
|
||
|
| ^ no implementation for `i8 + Option<i8>`
|
||
|
|
|
||
|
= help: the trait `Add<Option<i8>>` is not implemented for `i8`
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0277`.
|
||
|
error: could not compile `enums` due to previous error
|