Skip to content

Commit d709b48

Browse files
committed
Actually, need that overload still because we can't write String(describing:) for a move-only value
1 parent 16d888d commit d709b48

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/Testing/Attachments/Attachment.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ public struct AnyAttachable: AttachableWrapper, Sendable, Copyable {
180180

181181
// MARK: - Describing an attachment
182182

183+
extension Attachment where AttachableValue: ~Copyable {
184+
@_documentation(visibility: private)
185+
public var description: String {
186+
let typeInfo = TypeInfo(describing: AttachableValue.self)
187+
return #""\#(preferredName)": instance of '\#(typeInfo.unqualifiedName)'"#
188+
}
189+
}
190+
183191
extension Attachment: CustomStringConvertible {
184192
/// @Metadata {
185193
/// @Available(Swift, introduced: 6.2)

0 commit comments

Comments
 (0)