File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1069,8 +1069,8 @@ d = @mut 15;
10691069
10701070A mutable variable and an immutable variable can refer to the same box, given 
10711071that 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.
10741074
10751075~~~~ 
10761076let a = @1;     // immutable box 
@@ -1079,8 +1079,8 @@ let b = @mut 2; // mutable box
10791079let mut c : @int;       // declare a variable with type managed immutable int 
10801080let mut d : @mut int;   // and one of type managed mutable int 
10811081
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  
10841084
10851085// but b cannot be assigned to c, or a to d 
10861086c = b;          // error 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments