Skip to content

Commit 7e9608c

Browse files
kavonamartini51
andauthored
Doc: small fixes for Escapable explainer
Thanks to a review from @amartini51 Co-authored-by: Alex Martini <[email protected]>
1 parent 55eaed5 commit 7e9608c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/public/core/Misc.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,19 +239,19 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
239239
/// Extensions to the `Copyable` protocol are not allowed.
240240
@_marker public protocol Copyable/*: ~Escapable*/ {}
241241

242-
/// A protocol representing types whose values can persist beyond the immediate local context.
242+
/// A type whose values can persist beyond their immediate local scope.
243243
///
244-
/// They may be freely assigned to global or static variables, returned from functions, or captured by escaping
245-
/// closures, etc. All Swift types implicitly conform to this protocol by default, allowing them to be moved across
244+
/// Escapable values can be assigned to global or static variables, returned from functions, captured by escaping
245+
/// closures, and so on. All Swift types implicitly conform to this protocol by default, allowing them to be moved across
246246
/// scopes freely because they lack any lifetime dependencies.
247247
///
248248
/// In contrast, values of types that suppress their implicit conformance to `Escapable` (by writing `~Escapable`)
249249
/// carry a lifetime dependency. These dependencies ensure the `~Escapable` value does not live longer than the value it
250250
/// depends on. Explicit lifetime dependency annotations may be required when working with these types.
251251
///
252252
/// In generic contexts, `~Escapable` works much in the same way as `~Copyable`. It allows functions and types to work
253-
/// with values that may or may not be Escapable, and types can be conditionally Escapable based on their generic
254-
/// arguments. A conformance requirement for Escapable is automatically inferred in extensions and for generic type
253+
/// with values that may or may not be Escapable, and types can be conditionally `Escapable` based on their generic
254+
/// arguments. A conformance requirement for `Escapable` is automatically inferred in extensions and for generic type
255255
/// parameters, unless suppressed with `~Escapable`.
256256
@_marker public protocol Escapable/*: ~Copyable*/ {}
257257

0 commit comments

Comments
 (0)