Skip to content

Commit 2ccb251

Browse files
committed
Remove check that a token’s SyntaxArena must contain the token’s text
This is no longer satisfied if the token text is synthesized from a StaticString.
1 parent 1ab6472 commit 2ccb251

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Sources/SwiftSyntax/Raw/RawSyntax.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,6 @@ extension RawSyntax {
424424
presence: SourcePresence,
425425
arena: SyntaxArena
426426
) -> RawSyntax {
427-
assert(arena.contains(text: text) || kind.defaultText?.baseAddress == text.baseAddress,
428-
"token text must be managed by the arena, or known default text for the token")
429-
assert(triviaPieces.allSatisfy({$0.storedText.map({arena.contains(text: $0)}) ?? true}),
430-
"trivia text must be managed by the arena")
431427
let payload = RawSyntaxData.MaterializedToken(
432428
tokenKind: kind,
433429
tokenText: text,

0 commit comments

Comments
 (0)