Skip to content

Commit ccc4a7c

Browse files
committed
auto merge of #19136 : alfie/rust/master, r=steveklabnik
An example of how type definitions work would be handy
2 parents 0d0a290 + e87894e commit ccc4a7c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/doc/reference.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,12 @@ specific type; the type-specified aspects of a value include:
13341334
For example, the type `(u8, u8)` defines the set of immutable values that are
13351335
composite pairs, each containing two unsigned 8-bit integers accessed by
13361336
pattern-matching and laid out in memory with the `x` component preceding the
1337-
`y` component.
1337+
`y` component:
1338+
1339+
```
1340+
type Point = (u8, u8);
1341+
let p: Point = (41, 68);
1342+
```
13381343

13391344
### Structures
13401345

0 commit comments

Comments
 (0)