3 #![warn(clippy::match_single_binding)]
4 #![allow(unused_variables, clippy::many_single_char_names, clippy::toplevel_ref_arg)]
11 fn coords() -> Point {
20 let (x, y, z) = (a, b, c);
22 println!("{} {} {}", x, y, z);
25 let (x, y, z) = (a, b, c);
26 println!("{} {} {}", x, y, z);
30 _ => println!("Not 2"),
35 Some(d) => println!("{}", d),
36 _ => println!("None"),
43 println!("x has a value of {}", x);
49 println!("e is superior to 5");
53 let p = Point { x: 0, y: 7 };
54 let Point { x, y } = p;
55 println!("Coords: ({}, {})", x, y);
57 let Point { x: x1, y: y1 } = p;
58 println!("Coords: ({}, {})", x1, y1);
62 println!("Got a reference to {}", r);
66 println!("Got a mutable reference to {}", mr);
68 let Point { x, y } = coords();