We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e696922 + d3c787a commit b7956d9Copy full SHA for b7956d9
src/doc/trpl/compound-data-types.md
@@ -72,6 +72,20 @@ if x == y {
72
73
This will print `no`, because some of the values aren't equal.
74
75
+Note that the order of the values is considered when checking for equality,
76
+so the following example will also print `no`.
77
+
78
+```rust
79
+let x = (1, 2, 3);
80
+let y = (2, 1, 3);
81
82
+if x == y {
83
+ println!("yes");
84
+} else {
85
+ println!("no");
86
+}
87
+```
88
89
One other use of tuples is to return multiple values from a function:
90
91
```rust
0 commit comments