Skip to content

Commit 79498f4

Browse files
committed
Revert "Mark accessors @safe"
This reverts commit c3efd87.
1 parent c3efd87 commit 79498f4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Sources/TestingMacros/ConditionMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ extension ExitTestConditionMacro {
507507
"""
508508
@available(*, deprecated, message: "This type is an implementation detail of the testing library. Do not use it directly.")
509509
enum \(enumName) {
510-
@safe private nonisolated static let accessor: Testing.__TestContentRecordAccessor = { outValue, type, hint, _ in
510+
private nonisolated static let accessor: Testing.__TestContentRecordAccessor = { outValue, type, hint, _ in
511511
Testing.ExitTest.__store(
512512
\(idExpr),
513513
\(bodyThunkName),

Sources/TestingMacros/SuiteDeclarationMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public struct SuiteDeclarationMacro: MemberMacro, PeerMacro, Sendable {
145145
result.append(
146146
"""
147147
@available(*, deprecated, message: "This property is an implementation detail of the testing library. Do not use it directly.")
148-
@safe private nonisolated static let \(accessorName): Testing.__TestContentRecordAccessor = { outValue, type, _, _ in
148+
private nonisolated static let \(accessorName): Testing.__TestContentRecordAccessor = { outValue, type, _, _ in
149149
Testing.Test.__store(\(generatorName), into: outValue, asTypeAt: type)
150150
}
151151
"""

Sources/TestingMacros/Support/TestContentGeneration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func makeTestContentRecordDecl(named name: TokenSyntax, in typeName: TypeSyntax?
6868
private nonisolated \(staticKeyword(for: typeName)) let \(name): Testing.__TestContentRecord = (
6969
\(kindExpr), \(kind.commentRepresentation)
7070
0,
71-
\(accessorName),
71+
unsafe \(accessorName),
7272
\(contextExpr),
7373
0
7474
)

Sources/TestingMacros/TestDeclarationMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public struct TestDeclarationMacro: PeerMacro, Sendable {
472472
result.append(
473473
"""
474474
@available(*, deprecated, message: "This property is an implementation detail of the testing library. Do not use it directly.")
475-
@safe private \(staticKeyword(for: typeName)) nonisolated let \(accessorName): Testing.__TestContentRecordAccessor = { outValue, type, _, _ in
475+
private \(staticKeyword(for: typeName)) nonisolated let \(accessorName): Testing.__TestContentRecordAccessor = { outValue, type, _, _ in
476476
Testing.Test.__store(\(generatorName), into: outValue, asTypeAt: type)
477477
}
478478
"""

0 commit comments

Comments
 (0)