You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because this type is marked `~Escapable`, it cannot be returned from a function or even initialized without some way to relax the escapability restrictions.
87
+
Because this type is marked as unconditionally `~Escapable`, it cannot be returned from a function or even initialized without some way to relax the escapability restrictions.
88
88
This proposal provides a set of constraints that can tie the lifetime of a nonescapable value to the lifetime of some other value.
89
89
In the most common cases, these constraints can be inferred automatically.
90
90
@@ -136,7 +136,7 @@ In both this and the previous case, the lifetime of the return value is "scoped"
136
136
Because lifetime dependencies can only be attached to nonescapable values, types that contain pointers will generally need to be nonescapable in order to provide safe semantics.
137
137
As a result, **scoped lifetime dependencies** are the only possibility whenever an `Escapable` value (such as an Array or similar container) is providing a nonescapable value (such as the `BufferReference` or `MutatingBufferReference` in these examples).
138
138
139
-
#### Copy Lifetime Dependency
139
+
#### Copied Lifetime Dependency
140
140
141
141
The case where a nonescapable value is used to produce another nonescapable value is somewhat different.
142
142
Here's a typical example that constructs a new `BufferReference` from an existing one:
@@ -215,7 +215,7 @@ Given a method of this form:
215
215
The behavior depends as above on the mutation-modifier and whether the defining type is escapable or nonescapable.
216
216
217
217
**Initializers:** An initializer can define lifetime dependencies on one or more arguments.
218
-
In this case, we use the same rules same as for “Functions” above
218
+
In this case, we use the same rules as for “Functions” above
219
219
by using the convention that initializers can be viewed as functions that return `Self`:
0 commit comments