From e87894ef045139b5dbb2982f3522b4694fd3d6c0 Mon Sep 17 00:00:00 2001 From: Alfie John Date: Thu, 20 Nov 2014 09:44:57 +0000 Subject: [PATCH] doc: adding example for type definitions --- src/doc/reference.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index 4f0c9a504221..82b8428af777 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1274,7 +1274,12 @@ specific type; the type-specified aspects of a value include: For example, the type `(u8, u8)` defines the set of immutable values that are composite pairs, each containing two unsigned 8-bit integers accessed by pattern-matching and laid out in memory with the `x` component preceding the -`y` component. +`y` component: + +``` +type Point = (u8, u8); +let p: Point = (41, 68); +``` ### Structures