trpl-zh-cn/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/src/main.rs

9 lines
132 B
Rust

fn main() {
// ANCHOR: here
let x: i8 = 5;
let y: Option<i8> = Some(5);
let sum = x + y;
// ANCHOR_END: here
}