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.
16 lines
254 B
16 lines
254 B
3 years ago
|
fn main() {
|
||
|
// ANCHOR: here
|
||
|
struct Point {
|
||
|
x: i32,
|
||
|
y: i32,
|
||
|
z: i32,
|
||
|
}
|
||
|
|
||
|
let origin = Point { x: 0, y: 0, z: 0 };
|
||
|
|
||
|
match origin {
|
||
|
Point { x, .. } => println!("x is {}", x),
|
||
|
}
|
||
|
// ANCHOR_END: here
|
||
|
}
|