File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1069,8 +1069,8 @@ d = @mut 15;
1069
1069
1070
1070
A mutable variable and an immutable variable can refer to the same box, given
1071
1071
that their types are compatible. Mutability of a box is a property of its type,
1072
- however, so for example a mutable hande to an immutable box cannot be assigned
1073
- a reference to a mutable box.
1072
+ however, so for example a mutable handle to an immutable box cannot be
1073
+ assigned a reference to a mutable box.
1074
1074
1075
1075
~~~~
1076
1076
let a = @1; // immutable box
@@ -1079,8 +1079,8 @@ let b = @mut 2; // mutable box
1079
1079
let mut c : @int; // declare a variable with type managed immutable int
1080
1080
let mut d : @mut int; // and one of type managed mutable int
1081
1081
1082
- c = a; // box type is the same
1083
- d = b; // box type is the same
1082
+ c = a; // box type is the same, okay
1083
+ d = b; // box type is the same, okay
1084
1084
1085
1085
// but b cannot be assigned to c, or a to d
1086
1086
c = b; // error
You can’t perform that action at this time.
0 commit comments