Skip to content

Commit 9c005af

Browse files
committed
[stdlib] Update availability of String view additions
1 parent 3063641 commit 9c005af

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

stdlib/public/core/StringUTF16View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ extension String.UTF16View {
10621062
/// is trivially identical to `other`.
10631063
///
10641064
/// - Complexity: O(1)
1065-
@available(SwiftStdlib 6.3, *)
1065+
@available(StdlibDeploymentTarget 6.4, *)
10661066
public func isTriviallyIdentical(to other: Self) -> Bool {
10671067
self._guts.isTriviallyIdentical(to: other._guts)
10681068
}

stdlib/public/core/StringUTF8View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ extension String.UTF8View {
690690
/// is trivially identical to `other`.
691691
///
692692
/// - Complexity: O(1)
693-
@available(SwiftStdlib 6.3, *)
693+
@available(StdlibDeploymentTarget 6.4, *)
694694
public func isTriviallyIdentical(to other: Self) -> Bool {
695695
self._guts.isTriviallyIdentical(to: other._guts)
696696
}

stdlib/public/core/StringUnicodeScalarView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ extension String.UnicodeScalarView {
533533
/// is trivially identical to `other`.
534534
///
535535
/// - Complexity: O(1)
536-
@available(SwiftStdlib 6.3, *)
536+
@available(StdlibDeploymentTarget 6.4, *)
537537
public func isTriviallyIdentical(to other: Self) -> Bool {
538538
self._guts.isTriviallyIdentical(to: other._guts)
539539
}

stdlib/public/core/Substring.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ extension Substring.UTF8View {
887887
/// is trivially identical to `other`.
888888
///
889889
/// - Complexity: O(1)
890-
@available(SwiftStdlib 6.3, *)
890+
@available(StdlibDeploymentTarget 6.4, *)
891891
public func isTriviallyIdentical(to other: Self) -> Bool {
892892
self._base.isTriviallyIdentical(to: other._base)
893893
&& self._bounds == other._bounds
@@ -1054,7 +1054,7 @@ extension Substring.UTF16View {
10541054
/// is trivially identical to `other`.
10551055
///
10561056
/// - Complexity: O(1)
1057-
@available(SwiftStdlib 6.3, *)
1057+
@available(StdlibDeploymentTarget 6.4, *)
10581058
public func isTriviallyIdentical(to other: Self) -> Bool {
10591059
self._base.isTriviallyIdentical(to: other._base)
10601060
&& self._bounds == other._bounds
@@ -1310,7 +1310,7 @@ extension Substring.UnicodeScalarView {
13101310
/// is trivially identical to `other`.
13111311
///
13121312
/// - Complexity: O(1)
1313-
@available(SwiftStdlib 6.3, *)
1313+
@available(StdlibDeploymentTarget 6.4, *)
13141314
public func isTriviallyIdentical(to other: Self) -> Bool {
13151315
self._slice._base.isTriviallyIdentical(to: other._slice._base)
13161316
&& self._bounds == other._bounds

test/stdlib/StringAPI.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,10 @@ StringTests.test("_isIdentical(to:)") {
524524

525525
StringTests.test("String.UnicodeScalarView.isTriviallyIdentical(to:)")
526526
.skip(.custom({
527-
if #available(SwiftStdlib 6.3, *) { false } else { true }
528-
}, reason: "Requires Swift stdlib 6.3"))
527+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
528+
}, reason: "Requires Swift stdlib 6.4"))
529529
.code {
530-
guard #available(SwiftStdlib 6.3, *) else { return }
530+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
531531

532532
let a = "Hello".unicodeScalars
533533
let b = "Hello".unicodeScalars
@@ -542,10 +542,10 @@ StringTests.test("String.UnicodeScalarView.isTriviallyIdentical(to:)")
542542
}
543543
StringTests.test("String.UTF8View.isTriviallyIdentical(to:)")
544544
.skip(.custom({
545-
if #available(SwiftStdlib 6.3, *) { false } else { true }
546-
}, reason: "Requires Swift stdlib 6.3"))
545+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
546+
}, reason: "Requires Swift stdlib 6.4"))
547547
.code {
548-
guard #available(SwiftStdlib 6.3, *) else { return }
548+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
549549

550550
let a = "Hello".utf8
551551
let b = "Hello".utf8
@@ -561,10 +561,10 @@ StringTests.test("String.UTF8View.isTriviallyIdentical(to:)")
561561
}
562562
StringTests.test("String.UTF16View.isTriviallyIdentical(to:)")
563563
.skip(.custom({
564-
if #available(SwiftStdlib 6.3, *) { false } else { true }
565-
}, reason: "Requires Swift stdlib 6.3"))
564+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
565+
}, reason: "Requires Swift stdlib 6.4"))
566566
.code {
567-
guard #available(SwiftStdlib 6.3, *) else { return }
567+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
568568

569569
let a = "Hello".utf16
570570
let b = "Hello".utf16
@@ -581,10 +581,10 @@ StringTests.test("String.UTF16View.isTriviallyIdentical(to:)")
581581

582582
StringTests.test("Substring.UnicodeScalarView.isTriviallyIdentical(to:)")
583583
.skip(.custom({
584-
if #available(SwiftStdlib 6.3, *) { false } else { true }
585-
}, reason: "Requires Swift stdlib 6.3"))
584+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
585+
}, reason: "Requires Swift stdlib 6.4"))
586586
.code {
587-
guard #available(SwiftStdlib 6.3, *) else { return }
587+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
588588

589589
let base1 = "Test String"
590590
let a = base1[base1.index(base1.startIndex, offsetBy: 5)..<base1.endIndex]
@@ -603,10 +603,10 @@ StringTests.test("Substring.UnicodeScalarView.isTriviallyIdentical(to:)")
603603
}
604604
StringTests.test("Substring.UTF8View.isTriviallyIdentical(to:)")
605605
.skip(.custom({
606-
if #available(SwiftStdlib 6.3, *) { false } else { true }
607-
}, reason: "Requires Swift stdlib 6.3"))
606+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
607+
}, reason: "Requires Swift stdlib 6.4"))
608608
.code {
609-
guard #available(SwiftStdlib 6.3, *) else { return }
609+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
610610

611611
let base1 = "Test String"
612612
let a = base1[base1.index(base1.startIndex, offsetBy: 5)..<base1.endIndex]
@@ -625,10 +625,10 @@ StringTests.test("Substring.UTF8View.isTriviallyIdentical(to:)")
625625
}
626626
StringTests.test("Substring.UTF16View.isTriviallyIdentical(to:)")
627627
.skip(.custom({
628-
if #available(SwiftStdlib 6.3, *) { false } else { true }
629-
}, reason: "Requires Swift stdlib 6.3"))
628+
if #available(StdlibDeploymentTarget 6.4, *) { false } else { true }
629+
}, reason: "Requires Swift stdlib 6.4"))
630630
.code {
631-
guard #available(SwiftStdlib 6.3, *) else { return }
631+
guard #available(StdlibDeploymentTarget 6.4, *) else { return }
632632

633633
let base1 = "Test String"
634634
let a = base1[base1.index(base1.startIndex, offsetBy: 5)..<base1.endIndex]

0 commit comments

Comments
 (0)