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 08395a9 + 72c0275 commit ec37d45Copy full SHA for ec37d45
src/doc/reference.md
@@ -3328,10 +3328,13 @@ An example of a tuple type and its use:
3328
3329
```
3330
type Pair<'a> = (i32, &'a str);
3331
-let p: Pair<'static> = (10, "hello");
+let p: Pair<'static> = (10, "ten");
3332
let (a, b) = p;
3333
-assert!(b != "world");
3334
-assert!(p.0 == 10);
+
+assert_eq!(a, 10);
3335
+assert_eq!(b, "ten");
3336
+assert_eq!(p.0, 10);
3337
+assert_eq!(p.1, "ten");
3338
3339
3340
For historical reasons and convenience, the tuple type with no elements (`()`)
0 commit comments