Skip to content

Commit feb10f6

Browse files
authored
Merge pull request #2322 from jpsim/mark-syntaxchildrenindex-as-sendable
Mark `SyntaxChildrenIndex` as `Sendable`
2 parents 098b177 + cc92c30 commit feb10f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/SwiftSyntax/SyntaxChildren.swift

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

1515
/// The data for an index in a syntax children collection that is not the end
1616
/// index. See ``SyntaxChildrenIndex`` for the representation of the end index.
17-
struct SyntaxChildrenIndexData: Hashable, Comparable {
17+
struct SyntaxChildrenIndexData: Hashable, Comparable, Sendable {
1818
/// The UTF-8 offset of the item at this index in the source file
1919
/// See `AbsoluteSyntaxPosition.offset`
2020
let offset: UInt32
@@ -50,7 +50,7 @@ struct SyntaxChildrenIndexData: Hashable, Comparable {
5050
}
5151

5252
/// An index in a syntax children collection.
53-
public struct SyntaxChildrenIndex: Hashable, Comparable, ExpressibleByNilLiteral {
53+
public struct SyntaxChildrenIndex: Hashable, Comparable, ExpressibleByNilLiteral, Sendable {
5454
/// Construct the `endIndex` of a ``SyntaxChildren`` collection.
5555
public init(nilLiteral: ()) {
5656
self.data = nil

Sources/SwiftSyntax/SyntaxIdentifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/// Represents a unique value for a node within its own tree.
1414
@_spi(RawSyntax)
15-
public struct SyntaxIndexInTree: Comparable, Hashable {
15+
public struct SyntaxIndexInTree: Comparable, Hashable, Sendable {
1616
let indexInTree: UInt32
1717

1818
static var zero: SyntaxIndexInTree = SyntaxIndexInTree(indexInTree: 0)

0 commit comments

Comments
 (0)