We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83724ca commit 97a8973Copy full SHA for 97a8973
src/flow_control/match/destructuring/destructure_tuple.md
@@ -13,6 +13,8 @@ fn main() {
13
// Destructure the second and third elements
14
(0, y, z) => println!("First is `0`, `y` is {:?}, and `z` is {:?}", y, z),
15
(1, ..) => println!("First is `1` and the rest doesn't matter"),
16
+ (.., 2) => println!("last is `2` and the rest doesn't matter"),
17
+ (3, .., 4) => println!("First is `3`, last is `4`, and the rest doesn't matter"),
18
// `..` can be used to ignore the rest of the tuple
19
_ => println!("It doesn't matter what they are"),
20
// `_` means don't bind the value to a variable
0 commit comments