@@ -170,7 +170,7 @@ overwrite (or freeze) `(*x).f`, and thus invalidate the reference
170
170
that was created. In general it holds that when a path is
171
171
lent, restrictions are issued for all the owning prefixes of that
172
172
path. In this case, the path ` *x ` owns the path ` (*x).f ` and,
173
- because ` x ` is an owned pointer , the path ` x ` owns the path ` *x ` .
173
+ because ` x ` has ownership , the path ` x ` owns the path ` *x ` .
174
174
Therefore, borrowing ` (*x).f ` yields restrictions on both
175
175
` *x ` and ` x ` .
176
176
@@ -286,7 +286,7 @@ MUTABILITY(X, imm) // M-Var-Imm
286
286
287
287
### Checking mutability of owned content
288
288
289
- Fields and owned pointers inherit their mutability from
289
+ Fields and boxes inherit their mutability from
290
290
their base expressions, so both of their rules basically
291
291
delegate the check to the base expression ` LV ` :
292
292
@@ -387,7 +387,7 @@ LIFETIME(X, LT, MQ) // L-Local
387
387
388
388
### Checking lifetime for owned content
389
389
390
- The lifetime of a field or owned pointer is the same as the lifetime
390
+ The lifetime of a field or box is the same as the lifetime
391
391
of its owner:
392
392
393
393
``` text
@@ -466,10 +466,10 @@ origin of inherited mutability.
466
466
467
467
Because the mutability of owned referents is inherited, restricting an
468
468
owned referent is similar to restricting a field, in that it implies
469
- restrictions on the pointer. However, owned pointers have an important
469
+ restrictions on the pointer. However, boxes have an important
470
470
twist: if the owner ` LV ` is mutated, that causes the owned referent
471
471
` *LV ` to be freed! So whenever an owned referent ` *LV ` is borrowed, we
472
- must prevent the owned pointer ` LV ` from being mutated, which means
472
+ must prevent the box ` LV ` from being mutated, which means
473
473
that we always add ` MUTATE ` and ` CLAIM ` to the restriction set imposed
474
474
on ` LV ` :
475
475
@@ -648,7 +648,7 @@ fn main() {
648
648
```
649
649
650
650
Clause (2) propagates the restrictions on the referent to the pointer
651
- itself. This is the same as with an owned pointer , though the
651
+ itself. This is the same as with an box , though the
652
652
reasoning is mildly different. The basic goal in all cases is to
653
653
prevent the user from establishing another route to the same data. To
654
654
see what I mean, let's examine various cases of what can go wrong and
0 commit comments