File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ extension Optional where Wrapped: ~Copyable {
324
324
}
325
325
}
326
326
327
- extension Optional {
327
+ extension Optional where Wrapped : ~ Escapable {
328
328
/// The wrapped value of this instance, unwrapped without checking whether
329
329
/// the instance is `nil`.
330
330
///
@@ -349,6 +349,7 @@ extension Optional {
349
349
/// will never be equal to `nil` and only after you've tried using the
350
350
/// postfix `!` operator.
351
351
@inlinable
352
+ @_preInverseGenerics
352
353
@unsafe
353
354
public var unsafelyUnwrapped : Wrapped {
354
355
@inline ( __always)
@@ -361,7 +362,7 @@ extension Optional {
361
362
}
362
363
}
363
364
364
- extension Optional where Wrapped: ~ Copyable {
365
+ extension Optional where Wrapped: ~ Copyable & ~ Escapable {
365
366
// FIXME(NCG): Do we want this? It seems like we do. Make this public.
366
367
@_alwaysEmitIntoClient
367
368
public consuming func _consumingUnsafelyUnwrap( ) -> Wrapped {
@@ -374,12 +375,13 @@ extension Optional where Wrapped: ~Copyable {
374
375
}
375
376
}
376
377
377
- extension Optional {
378
+ extension Optional where Wrapped : ~ Escapable {
378
379
/// - Returns: `unsafelyUnwrapped`.
379
380
///
380
381
/// This version is for internal stdlib use; it avoids any checking
381
382
/// overhead for users, even in Debug builds.
382
383
@inlinable
384
+ @_preInverseGenerics
383
385
internal var _unsafelyUnwrappedUnchecked : Wrapped {
384
386
@inline ( __always)
385
387
get {
You can’t perform that action at this time.
0 commit comments