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 {
365365extension Optional where Wrapped: ~ Copyable & ~ Escapable {
366366 // FIXME(NCG): Do we want this? It seems like we do. Make this public.
367367 @_alwaysEmitIntoClient
368+ @lifetime ( copy self)
368369 public consuming func _consumingUnsafelyUnwrap( ) -> Wrapped {
369370 switch consume self {
370371 case . some( let x) :
@@ -384,6 +385,7 @@ extension Optional where Wrapped: ~Escapable {
384385 @_preInverseGenerics
385386 internal var _unsafelyUnwrappedUnchecked : Wrapped {
386387 @inline ( __always)
388+ @lifetime ( copy self)
387389 get {
388390 if let x = self {
389391 return x
@@ -476,11 +478,13 @@ extension Optional: CustomReflectable {
476478
477479@_transparent
478480public // 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+ ) {
484488 // Cannot use _preconditionFailure as the file and line info would not be
485489 // printed.
486490 if Bool ( _isImplicitUnwrap) {
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ extension Result where Success: ~Copyable & ~Escapable {
138138 /// - Returns: A `Result` instance with the result of evaluating `transform`
139139 /// as the new failure value if this instance represents a failure.
140140 @_alwaysEmitIntoClient
141+ @lifetime ( copy self)
141142 public consuming func mapError< NewFailure> (
142143 _ transform: ( Failure ) -> NewFailure
143144 ) -> Result < Success , NewFailure > {
You can’t perform that action at this time.
0 commit comments