File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -345,11 +345,11 @@ extension String.UTF8View {
345
345
#endif
346
346
let count = _guts. count
347
347
if _guts. isSmall {
348
- let a = Builtin . addressOfBorrow ( self )
349
- let address = unsafe UnsafePointer< UTF8 . CodeUnit > ( a)
350
- let span = unsafe Span( _unsafeStart: address, count: count)
351
348
fatalError ( " Span over the small string form is not supported yet. " )
352
- return unsafe _override Lifetime ( span, borrowing: self )
349
+ // let a = Builtin.addressOfBorrow(self)
350
+ // let address = unsafe UnsafePointer<UTF8.CodeUnit>(a)
351
+ // let span = unsafe Span(_unsafeStart: address, count: count)
352
+ // return unsafe _overrideLifetime(span, borrowing: self)
353
353
}
354
354
_precondition ( _guts. isFastUTF8)
355
355
let buffer = unsafe _guts. _object . fastUTF8
Original file line number Diff line number Diff line change @@ -789,12 +789,12 @@ extension Substring.UTF8View {
789
789
let first = _slice. _startIndex. _encodedOffset
790
790
let end = _slice. _endIndex. _encodedOffset
791
791
if _wholeGuts. isSmall {
792
- let a = Builtin . addressOfBorrow ( self )
793
- let offset = first &+ ( 2 &* MemoryLayout< String . Index> . stride)
794
- let start = unsafe UnsafePointer< UTF8 . CodeUnit > ( a) . advanced ( by: offset)
795
- let span = unsafe Span( _unsafeStart: start, count: end &- first)
796
792
fatalError ( " Span over the small string form is not supported yet. " )
797
- return unsafe _override Lifetime ( span, borrowing: self )
793
+ // let a = Builtin.addressOfBorrow(self)
794
+ // let offset = first &+ (2 &* MemoryLayout<String.Index>.stride)
795
+ // let start = unsafe UnsafePointer<UTF8.CodeUnit>(a).advanced(by: offset)
796
+ // let span = unsafe Span(_unsafeStart: start, count: end &- first)
797
+ // return unsafe _overrideLifetime(span, borrowing: self)
798
798
}
799
799
_internalInvariant ( _wholeGuts. isFastUTF8)
800
800
var span = unsafe Span( _unsafeElements: _wholeGuts. _object. fastUTF8)
You can’t perform that action at this time.
0 commit comments