Skip to content

Commit 6508c65

Browse files
authored
[SE-0456] Clarifications (#2665)
* [SE-0456] Clarify UnsafeBufferPointer invariants * [SE-0456] Clarify “Implications on adoption”
1 parent 849d84e commit 6508c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/0456-stdlib-span-properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ extension UnsafeMutableRawBufferPointer {
179179
}
180180
```
181181

182-
All of these unsafe conversions return a value whose lifetime is dependent on the _binding_ of the UnsafeBufferPointer. Note that this does not keep the underlying memory alive, as usual where the `UnsafePointer` family of types is involved. The programmer must ensure the following invariants for as long as the `Span` or `RawSpan` binding is valid:
182+
All of these unsafe conversions return a value whose lifetime is dependent on the _binding_ of the UnsafeBufferPointer. This dependency does not keep the underlying memory alive. As is usual where the `UnsafePointer` family of types is involved, the programmer must ensure the memory remains allocated while it is in use. Additionally, the following invariants must remain true for as long as the `Span` or `RawSpan` value exists:
183183

184184
- The underlying memory remains initialized.
185185
- The underlying memory is not mutated.
@@ -220,7 +220,7 @@ This proposal is additive and ABI-compatible with existing code.
220220

221221
## Implications on adoption
222222

223-
The additions described in this proposal require a new version of the Swift standard library and runtime.
223+
The additions described in this proposal require a version of the Swift standard library which include the `Span` and `RawSpan` types.
224224

225225
## Alternatives considered
226226

0 commit comments

Comments
 (0)