Skip to content

Commit 0ed7906

Browse files
committed
Typo: fix two more cases of Array -> ContiguousArray renaming.
1 parent 51832e8 commit 0ed7906

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/NNNN-lifetime-dependency.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ We expect these implicit inferences to cover most cases, with the explicit form
307307
Normally, lifetime dependence is required when a nonescapable function result depends on an argument to that function. In some rare cases, however, a nonescapable function parameter may depend on another argument to that function. Consider a function with an `inout` parameter. The function body may reassign that parameter to a value that depends on another parameter. This is similar in principle to a result dependence.
308308

309309
```swift
310-
func mayReassign(span: dependsOn(a) inout Span<Int>, to a: [Int]) {
310+
func mayReassign(span: dependsOn(a) inout Span<Int>, to a: ContiguousArray<Int>) {
311311
span = a.span()
312312
}
313313
```
@@ -795,7 +795,7 @@ func reassign(_ span: inout Span<Int>) {
795795
If a function takes a nonescapable 'inout' argument, it may only reassign that argument if it is marked dependent on another function argument that provies the source of the dependence.
796796

797797
```swift
798-
func reassignWithArgDependence(_ span: dependsOn(arg) inout [Int], _ arg: [Int]) {
798+
func reassignWithArgDependence(_ span: dependsOn(arg) inout ContiguousArray<Int>, _ arg: ContiguousArray<Int>) {
799799
span = arg.span() // ✅ OK: 'span' already depends on 'arg' in the caller's scope.
800800
}
801801
```

0 commit comments

Comments
 (0)