Skip to content

Commit 9936393

Browse files
committed
[span] temporarily add a feature guard
1 parent 9073576 commit 9936393

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/core/Span/Span.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,12 @@ extension Span where Element: Equatable {
370370
@_disallowFeatureSuppression(NonescapableTypes)
371371
@_alwaysEmitIntoClient
372372
public func _elementsEqual(_ other: some Collection<Element>) -> Bool {
373+
#if hasFeature(LifetimeDependence)
373374
let equal = other.withContiguousStorageIfAvailable {
374375
_elementsEqual(Span(_unsafeElements: $0))
375376
}
376377
if let equal { return equal }
378+
#endif
377379

378380
guard count == other.count else { return false }
379381
if count == 0 { return true }

0 commit comments

Comments
 (0)