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.
1 parent 912ab64 commit 72c0275Copy full SHA for 72c0275
src/doc/reference.md
@@ -3322,10 +3322,13 @@ An example of a tuple type and its use:
3322
3323
```
3324
type Pair<'a> = (i32, &'a str);
3325
-let p: Pair<'static> = (10, "hello");
+let p: Pair<'static> = (10, "ten");
3326
let (a, b) = p;
3327
-assert!(b != "world");
3328
-assert!(p.0 == 10);
+
+assert_eq!(a, 10);
3329
+assert_eq!(b, "ten");
3330
+assert_eq!(p.0, 10);
3331
+assert_eq!(p.1, "ten");
3332
3333
3334
For historical reasons and convenience, the tuple type with no elements (`()`)
0 commit comments