@@ -237,7 +237,7 @@ struct Box<T: ~Escapable>: ~Escapable {
237
237
238
238
// Box gains the ability to escape whenever its
239
239
// generic argument is Escapable
240
- extension Box : Escapable when T : Escapable { }
240
+ extension Box : Escapable where T: Escapable { }
241
241
```
242
242
243
243
This can be used in conjunction with other suppressible protocols.
@@ -322,9 +322,9 @@ The lifetime dependency would ensure that such an iterator could not outlive the
322
322
``` swift
323
323
// Example: Nonescaping iterator
324
324
struct NEIterator {
325
- // `borrow (container)` indicates that the constructed value
325
+ // `dependsOn (container)` indicates that the constructed value
326
326
// cannot outlive the `container` argument.
327
- init (over container : MyContainer) -> borrow (container) Self {
327
+ init (over container : MyContainer) -> dependsOn (container) Self {
328
328
... initialize an iterator suitable for `MyContainer` ...
329
329
}
330
330
}
@@ -385,7 +385,7 @@ struct Box<T> {
385
385
}
386
386
387
387
// But if T requires additional checks, so does Box
388
- extension Box : Nonescapable when T : Nonescapable { }
388
+ extension Box : Nonescapable where T: Nonescapable { }
389
389
```
390
390
391
391
However, this would imply that any `Nonescapable` type was a
@@ -431,7 +431,7 @@ In particular, the use cases we’ve so far considered have all been resolvable
431
431
struct NE: ~ Escapable {
432
432
// Proposed lifetime dependency notation;
433
433
// see separate proposal for details.
434
- init (from : SomeType) -> borrow (from) Self {}
434
+ init (from : SomeType) -> dependsOn (from) Self {}
435
435
}
436
436
```
437
437
0 commit comments