File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,7 @@ extension Optional where Wrapped: ~Escapable {
365
365
extension Optional where Wrapped: ~ Copyable & ~ Escapable {
366
366
// FIXME(NCG): Do we want this? It seems like we do. Make this public.
367
367
@_alwaysEmitIntoClient
368
+ @lifetime ( copy self)
368
369
public consuming func _consumingUnsafelyUnwrap( ) -> Wrapped {
369
370
switch consume self {
370
371
case . some( let x) :
@@ -384,6 +385,7 @@ extension Optional where Wrapped: ~Escapable {
384
385
@_preInverseGenerics
385
386
internal var _unsafelyUnwrappedUnchecked : Wrapped {
386
387
@inline ( __always)
388
+ @lifetime ( copy self)
387
389
get {
388
390
if let x = self {
389
391
return x
@@ -476,11 +478,13 @@ extension Optional: CustomReflectable {
476
478
477
479
@_transparent
478
480
public // COMPILER_INTRINSIC
479
- func _diagnoseUnexpectedNilOptional( _filenameStart: Builtin . RawPointer ,
480
- _filenameLength: Builtin . Word ,
481
- _filenameIsASCII: Builtin . Int1 ,
482
- _line: Builtin . Word ,
483
- _isImplicitUnwrap: Builtin . Int1 ) {
481
+ func _diagnoseUnexpectedNilOptional(
482
+ _filenameStart: Builtin . RawPointer ,
483
+ _filenameLength: Builtin . Word ,
484
+ _filenameIsASCII: Builtin . Int1 ,
485
+ _line: Builtin . Word ,
486
+ _isImplicitUnwrap: Builtin . Int1
487
+ ) {
484
488
// Cannot use _preconditionFailure as the file and line info would not be
485
489
// printed.
486
490
if Bool ( _isImplicitUnwrap) {
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ extension Result where Success: ~Copyable & ~Escapable {
138
138
/// - Returns: A `Result` instance with the result of evaluating `transform`
139
139
/// as the new failure value if this instance represents a failure.
140
140
@_alwaysEmitIntoClient
141
+ @lifetime ( copy self)
141
142
public consuming func mapError< NewFailure> (
142
143
_ transform: ( Failure ) -> NewFailure
143
144
) -> Result < Success , NewFailure > {
You can’t perform that action at this time.
0 commit comments