Skip to content

Commit 48a0f06

Browse files
authored
Merge pull request #2445 from ahoppen/ahoppen/revert-sendable-conformances
Revert "Merge pull request #2425 from ahoppen/ahoppen/sendable-conformances"
2 parents 7733d30 + aeb51f8 commit 48a0f06

File tree

67 files changed

+234
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+234
-416
lines changed

CodeGeneration/Sources/generate-swift-syntax/templates/swiftparser/ExperimentalFeaturesFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let experimentalFeaturesFile = SourceFileSyntax(leadingTrivia: copyrightHeader)
2020
"""
2121
extension Parser {
2222
@_spi(ExperimentalLanguageFeatures)
23-
public struct ExperimentalFeatures: OptionSet, Sendable {
23+
public struct ExperimentalFeatures: OptionSet {
2424
public let rawValue: UInt
2525
public init(rawValue: UInt) {
2626
self.rawValue = rawValue

CodeGeneration/Sources/generate-swift-syntax/templates/swiftparser/LayoutNodesParsableFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let layoutNodesParsableFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
4141
defer { withExtendedLifetime(parser) {} }
4242
let node = parser.\(parserFunction)()
4343
let raw = RawSyntax(parser.parseRemainder(into: node))
44-
return Syntax(raw: raw, rawNodeArena: parser.arena).cast(Self.self)
44+
return Syntax(raw: raw, rawNodeArena: raw.arena).cast(Self.self)
4545
}
4646
}
4747
"""

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/KeywordFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let lookupTable = ArrayExprSyntax(leftSquare: .leftSquareToken(trailingTrivia: .
2424
let keywordFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
2525
try! EnumDeclSyntax(
2626
"""
27-
public enum Keyword: UInt8, Hashable, Sendable
27+
public enum Keyword: UInt8, Hashable
2828
"""
2929
) {
3030
for keyword in Keyword.allCases {

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxEnumFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let syntaxEnumFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enum to exhaustively switch over all different syntax nodes.
22-
public enum SyntaxEnum: Sendable
22+
public enum SyntaxEnum
2323
"""
2424
) {
2525
DeclSyntax("case token(TokenSyntax)")

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxKindFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let syntaxKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
22-
public enum SyntaxKind: Sendable
22+
public enum SyntaxKind
2323
"""
2424
) {
2525
DeclSyntax("case token")

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
5050
}
5151
5252
return withExtendedLifetime(rewritten) {
53-
return Syntax(node).replacingSelf(rewritten.raw, rawNodeArena: rewritten.raw.arenaReference.retained, allocationArena: SyntaxArena())
53+
return Syntax(node).replacingSelf(rewritten.raw, rawNodeArena: rewritten.raw.arena, allocationArena: SyntaxArena())
5454
}
5555
}
5656
"""

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/TokenKindFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let tokenKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enumerates the kinds of tokens in the Swift language.
22-
public enum TokenKind: Hashable, Sendable
22+
public enum TokenKind: Hashable
2323
"""
2424
) {
2525
for tokenSpec in Token.allCases.map(\.spec) {

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/TriviaPiecesFile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let triviaPiecesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
2626
///
2727
/// In general, you should deal with the actual Trivia collection instead
2828
/// of individual pieces whenever possible.
29-
public enum TriviaPiece: Sendable
29+
public enum TriviaPiece
3030
"""
3131
) {
3232
for trivia in TRIVIAS {
@@ -176,7 +176,7 @@ let triviaPiecesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
176176
/// In contrast to ``TriviaPiece``, a ``RawTriviaPiece`` does not own the source
177177
/// text of the trivia.
178178
@_spi(RawSyntax)
179-
public enum RawTriviaPiece: Equatable, Sendable
179+
public enum RawTriviaPiece: Equatable
180180
"""
181181
) {
182182
for trivia in TRIVIAS {

Sources/SwiftDiagnostics/Diagnostic.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SwiftSyntax
1414

15-
public struct Diagnostic: CustomDebugStringConvertible, Sendable {
15+
public struct Diagnostic: CustomDebugStringConvertible {
1616
/// The message that should be displayed to the user
1717
public let diagMessage: DiagnosticMessage
1818

@@ -74,7 +74,7 @@ public struct Diagnostic: CustomDebugStringConvertible, Sendable {
7474
}
7575
}
7676

77-
public struct DiagnosticsError: Error, Sendable {
77+
public struct DiagnosticsError: Error {
7878
public var diagnostics: [Diagnostic]
7979

8080
/// The diagnostics must contain at least one with severity == `.error`.

Sources/SwiftDiagnostics/FixIt.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import SwiftSyntax
1515
/// Types conforming to this protocol represent Fix-It messages that can be
1616
/// shown to the client.
1717
/// The messages should describe the change that the Fix-It will perform
18-
public protocol FixItMessage: Sendable {
18+
public protocol FixItMessage {
1919
/// The Fix-It message that should be displayed in the client.
2020
var message: String { get }
2121

@@ -24,8 +24,8 @@ public protocol FixItMessage: Sendable {
2424
}
2525

2626
/// A Fix-It that can be applied to resolve a diagnostic.
27-
public struct FixIt: Sendable {
28-
public enum Change: Sendable {
27+
public struct FixIt {
28+
public enum Change {
2929
/// Replace `oldNode` by `newNode`.
3030
case replace(oldNode: Syntax, newNode: Syntax)
3131
/// Replace the leading trivia on the given token

0 commit comments

Comments
 (0)