Skip to content

Commit 9e61008

Browse files
committed
Mark Syntax.Info.info as nonisolated(unsafe)
1 parent d2f9554 commit 9e61008

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/SwiftSyntax/Syntax.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ public struct Syntax: SyntaxProtocol, SyntaxHashable {
4646
/// - Important: Must only be set to `nil` when `Syntax.Info` is used in a memory recycling pool
4747
/// (eg. in `SyntaxVisitor`). In that case the `Syntax.Info` is considered garbage memory that can be re-used
4848
/// later. `info` needs to be set to a real value when `Syntax.Info` is recycled from the memory recycling pool.
49+
#if compiler(>=6.0)
50+
nonisolated(unsafe) var info: InfoImpl!
51+
#else
4952
var info: InfoImpl!
53+
#endif
5054
}
5155

5256
/// Reference to the node's parent or, if this node is the root of a tree, a reference to the `SyntaxArena` to keep

0 commit comments

Comments
 (0)