3 #![warn(clippy::match_single_binding)]
4 #![allow(unused_variables, clippy::many_single_char_names, clippy::toplevel_ref_arg)]
11 fn coords() -> Point {
22 println!("{} {} {}", x, y, z);
27 (x, y, z) => println!("{} {} {}", x, y, z),
32 _ => println!("Not 2"),
37 Some(d) => println!("{}", d),
38 _ => println!("None"),
42 _ => println!("whatever"),
48 println!("x has a value of {}", x);
56 println!("e is superior to 5");
61 let p = Point { x: 0, y: 7 };
63 Point { x, y } => println!("Coords: ({}, {})", x, y),
67 Point { x: x1, y: y1 } => println!("Coords: ({}, {})", x1, y1),
72 ref r => println!("Got a reference to {}", r),
77 ref mut mr => println!("Got a mutable reference to {}", mr),
80 let product = match coords() {
81 Point { x, y } => x * y,