Tutorial: fix typo

This commit is contained in:
Diggory Hardy 2013-04-04 22:35:23 +02:00
parent 964fc862e0
commit 1e483c7b70

View File

@ -1069,8 +1069,8 @@ d = @mut 15;
A mutable variable and an immutable variable can refer to the same box, given A mutable variable and an immutable variable can refer to the same box, given
that their types are compatible. Mutability of a box is a property of its type, that their types are compatible. Mutability of a box is a property of its type,
however, so for example a mutable hande to an immutable box cannot be assigned however, so for example a mutable handle to an immutable box cannot be
a reference to a mutable box. assigned a reference to a mutable box.
~~~~ ~~~~
let a = @1; // immutable box let a = @1; // immutable box
@ -1079,8 +1079,8 @@ let b = @mut 2; // mutable box
let mut c : @int; // declare a variable with type managed immutable int let mut c : @int; // declare a variable with type managed immutable int
let mut d : @mut int; // and one of type managed mutable int let mut d : @mut int; // and one of type managed mutable int
c = a; // box type is the same c = a; // box type is the same, okay
d = b; // box type is the same d = b; // box type is the same, okay
// but b cannot be assigned to c, or a to d // but b cannot be assigned to c, or a to d
c = b; // error c = b; // error