Skip to content

Commit 643c535

Browse files
committed
[Macros] Remove the ConformanceMacro protocol.
1 parent f4dd574 commit 643c535

File tree

3 files changed

+0
-118
lines changed

3 files changed

+0
-118
lines changed

Sources/SwiftSyntaxMacros/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ add_swift_host_library(SwiftSyntaxMacros
1010
MacroProtocols/AccessorMacro.swift
1111
MacroProtocols/AttachedMacro.swift
1212
MacroProtocols/CodeItemMacro.swift
13-
MacroProtocols/ConformanceMacro.swift
1413
MacroProtocols/DeclarationMacro.swift
1514
MacroProtocols/ExpressionMacro.swift
1615
MacroProtocols/ExtensionMacro.swift

Sources/SwiftSyntaxMacros/MacroProtocols/ConformanceMacro.swift

Lines changed: 0 additions & 68 deletions
This file was deleted.

Tests/SwiftSyntaxMacroExpansionTest/MacroSystemTests.swift

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,6 @@ public struct DeclsFromStringsMacro: DeclarationMacro, MemberMacro {
642642
}
643643
}
644644

645-
public struct SendableConformanceMacro: ConformanceMacro {
646-
public static func expansion(
647-
of node: AttributeSyntax,
648-
providingConformancesOf declaration: some DeclGroupSyntax,
649-
in context: some MacroExpansionContext
650-
) throws -> [(TypeSyntax, GenericWhereClauseSyntax?)] {
651-
return [("Sendable", nil)]
652-
}
653-
}
654-
655645
public struct SendableExtensionMacro: ExtensionMacro {
656646
public static func expansion(
657647
of node: AttributeSyntax,
@@ -717,7 +707,6 @@ public let testMacros: [String: Macro.Type] = [
717707
"wrapStoredProperties": WrapStoredProperties.self,
718708
"customTypeWrapper": CustomTypeWrapperMacro.self,
719709
"unwrap": UnwrapMacro.self,
720-
"AddSendable": SendableConformanceMacro.self,
721710
"AddSendableExtension": SendableExtensionMacro.self,
722711
]
723712

@@ -1537,44 +1526,6 @@ final class MacroSystemTests: XCTestCase {
15371526
)
15381527
}
15391528

1540-
func testConformanceExpansion() {
1541-
assertMacroExpansion(
1542-
"""
1543-
@AddSendable
1544-
struct MyType {
1545-
}
1546-
""",
1547-
expandedSource: """
1548-
1549-
struct MyType {
1550-
}
1551-
1552-
extension MyType: Sendable {
1553-
}
1554-
""",
1555-
macros: testMacros,
1556-
indentationWidth: indentationWidth
1557-
)
1558-
1559-
assertMacroExpansion(
1560-
"""
1561-
@AddSendable
1562-
extension A.B {
1563-
}
1564-
""",
1565-
expandedSource: """
1566-
1567-
extension A.B {
1568-
}
1569-
1570-
extension A.B: Sendable {
1571-
}
1572-
""",
1573-
macros: testMacros,
1574-
indentationWidth: indentationWidth
1575-
)
1576-
}
1577-
15781529
func testExtensionExpansion() {
15791530
assertMacroExpansion(
15801531
"""

0 commit comments

Comments
 (0)