Skip to content

Commit 4533a27

Browse files
authored
Merge pull request #722 from apple/bump-swift-version-to-6
[swift/main] Update the Swift version to 6.0
2 parents 8c4b525 + ed5d6e9 commit 4533a27

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let availabilityDefinition = PackageDescription.SwiftSetting.unsafeFlags([
2323
"-Xfrontend",
2424
"-define-availability",
2525
"-Xfrontend",
26-
"SwiftStdlib 5.11:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999",
26+
"SwiftStdlib 6.0:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999",
2727
])
2828

2929
/// Swift settings for building a private stdlib-like module that is to be used

Sources/_StringProcessing/LiteralPrinter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extension Regex {
3333
/// the `CustomConsumingRegexComponent` protocol, this property is `nil`.
3434
///
3535
/// The value of this property may change between different releases of Swift.
36-
@available(SwiftStdlib 5.11, *)
36+
@available(SwiftStdlib 6.0, *)
3737
public var _literalPattern: String? {
3838
var gen = LiteralPrinter(options: MatchingOptions())
3939
gen.outputNode(self.program.tree.root)

Tests/RegexTests/LiteralPrinterTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import XCTest
1414
import _StringProcessing
1515
import RegexBuilder
1616

17-
@available(SwiftStdlib 5.11, *)
17+
@available(SwiftStdlib 6.0, *)
1818
extension RegexTests {
1919
func testPrintableRegex() throws {
2020
let regexString = #"([a-fGH1-9[^\D]]+)?b*cd(e.+)\2\w\S+?"#
@@ -56,7 +56,7 @@ extension RegexTests {
5656
// MARK: - PrintableRegex
5757

5858
// Demonstration of a guaranteed Codable/Sendable regex type.
59-
@available(SwiftStdlib 5.11, *)
59+
@available(SwiftStdlib 6.0, *)
6060
struct PrintableRegex: RegexComponent, @unchecked Sendable {
6161
var pattern: String
6262
var regex: Regex<AnyRegexOutput>
@@ -77,7 +77,7 @@ struct PrintableRegex: RegexComponent, @unchecked Sendable {
7777
}
7878
}
7979

80-
@available(SwiftStdlib 5.11, *)
80+
@available(SwiftStdlib 6.0, *)
8181
extension PrintableRegex: Codable {
8282
init(from decoder: Decoder) throws {
8383
let container = try decoder.singleValueContainer()
@@ -91,7 +91,7 @@ extension PrintableRegex: Codable {
9191
}
9292
}
9393

94-
@available(SwiftStdlib 5.11, *)
94+
@available(SwiftStdlib 6.0, *)
9595
extension PrintableRegex: CustomStringConvertible {
9696
var description: String {
9797
pattern

Tests/RegexTests/MatchTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct MatchError: Error {
2323

2424
// This just piggy-backs on the existing match testing to validate that
2525
// literal patterns round trip correctly.
26-
@available(SwiftStdlib 5.11, *)
26+
@available(SwiftStdlib 6.0, *)
2727
func _roundTripLiteral(
2828
_ regexStr: String,
2929
syntax: SyntaxOptions
@@ -88,7 +88,7 @@ func _firstMatch(
8888
}
8989
}
9090

91-
if #available(SwiftStdlib 5.11, *) {
91+
if #available(SwiftStdlib 6.0, *) {
9292
let roundTripRegex = try? _roundTripLiteral(regexStr, syntax: syntax)
9393
let roundTripResult = try? roundTripRegex?
9494
.matchingSemantics(semanticLevel)

Tests/RegexTests/ParseTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func parseTest(
119119
}
120120
serializedCaptures.deallocate()
121121

122-
if #available(SwiftStdlib 5.11, *),
122+
if #available(SwiftStdlib 6.0, *),
123123
!unsupported && expectedErrors.isEmpty,
124124
let pattern = Regex<AnyRegexOutput>(ast: ast)._literalPattern
125125
{

0 commit comments

Comments
 (0)