Skip to content

Mark SyntaxChildrenIndex as Sendable #2322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/SwiftSyntax/SyntaxChildren.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

/// An index in a syntax children collection.
public struct SyntaxChildrenIndex: Hashable, Comparable, ExpressibleByNilLiteral {
public struct SyntaxChildrenIndex: Hashable, Comparable, ExpressibleByNilLiteral, Sendable {
/// Construct the `endIndex` of a ``SyntaxChildren`` collection.
public init(nilLiteral: ()) {
self.data = nil
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftSyntax/SyntaxIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

static var zero: SyntaxIndexInTree = SyntaxIndexInTree(indexInTree: 0)
Expand Down