@@ -48,7 +48,7 @@ semantics:
4848You can also choose to have copy semantics for user-defined types
4949by implementing the ` Copy ` trait. One straightforward way to do that is
5050to add ` #[derive(Copy)] ` before the definition of the ` struct ` . Not all
51- user-defined types are allowed to implement ` Copy ` trait. All field of
51+ user-defined types are allowed to implement the ` Copy ` trait. All fields of
5252a type must implement ` Copy ` and the type must not have a destructor.
5353Destructors probably need a post of their own, but for now, an object
5454in Rust has a destructor if it implements the ` Drop ` trait.
@@ -101,8 +101,8 @@ reference to each variant. This match goes two levels deep - it matches the type
101101(always a reference) and looks inside the type to match the referred type (which
102102is ` Enum1 ` ).
103103
104- Either way, we must ensure that we (that is, the compiler) must ensure we
105- respect Rust's invariants around moves and references - we must not move any
104+ Either way, we must ensure that we (that is, the compiler) respect
105+ Rust's invariants around moves and references - we must not move any
106106part of an object if it is referenced. If the value being matched has copy
107107semantics, that is trivial. If it has move semantics then we must make sure that
108108moves don't happen in any match arm. This is accomplished either by ignoring
@@ -168,7 +168,7 @@ match x {
168168```
169169
170170because in both cases it means moving part of ` x ` into ` y ` . We can use the 'ref'
171- keyword to get a reference to the data in ` Var1 ` : ` &Var1(ref y) => {} ` .That is
171+ keyword to get a reference to the data in ` Var1 ` : ` &Var1(ref y) => {} ` . That is
172172OK, because now we are not dereferencing anywhere and thus not moving any part
173173of ` x ` . Instead we are creating a pointer which points into the interior of ` x ` .
174174
0 commit comments