Skip to content

Commit 43dbc15

Browse files
committed
Tweak wording in the ref1.drop example.
1 parent 6c80aca commit 43dbc15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

proposals/NNNN-lifetime-dependency.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ let ref1 = a.span() // ref1 cannot outlive a
181181
let ref2 = ref1.drop(4) // ref2 also cannot outlive a
182182
```
183183

184-
After `ref1.drop(4)`, the lifetime of `ref2` does not depend on `ref1`.
185-
Rather, `ref2` has **inherited** or **copied** `ref1`’s dependency on the lifetime of `a`.
184+
After `ref1.drop(4)`, the lifetime of `ref2` does not depend on `ref1`, which is consumed within the method. Instead,
185+
the `drop` method **copies** `ref1`s lifetime depenence onto `ref2`. `ref2` effectively **inherits** a lifetime
186+
dependency on `a`. We may refer to a lifetime dependence that has been copied from another value as an "inherited"
187+
dependence.
186188

187189
#### Allowed Lifetime Dependencies
188190

0 commit comments

Comments
 (0)