Skip to content

Commit 5544eb6

Browse files
committed
Add requirements & sketch TSPL cross reference
(cherry picked from commit 8468088)
1 parent afff079 commit 5544eb6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

stdlib/public/core/Misc.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
171171

172172
/// A type whose values can be implicitly or explicitly copied.
173173
///
174-
/// XXX this protocol has no symbol requirements, but it does have semantic requirements
174+
/// Although this protocol doesn’t have any required methods or properties,
175+
/// it does have semantic requirements that are enforced at compile time.
176+
/// These requirements are listed in the sections below.
177+
/// XXX what are the requirements -- just that copying is ok?
178+
/// Conformance to `Copyable` must be declared
179+
/// in the same file as the type's declaration.
180+
/// <!-- XXX TR: Confirm previous sentence; borrowed from Sendable docs -->
175181
///
176182
/// Conformance to the `Copyable` protocol
177183
/// is implicitly included in the following places:
@@ -216,7 +222,12 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
216222
///
217223
/// Extensions on the `Copyable` protocol are not allowed.
218224
///
219-
/// XXX xref to TSPL
225+
/// XXX link to the right chapter
226+
/// For information about the language-level concurrency model that `Task` is part of,
227+
/// see [Concurrency][concurrency] in [The Swift Programming Language][tspl].
228+
///
229+
/// [concurrency]: https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html
230+
/// [tspl]: https://docs.swift.org/swift-book/
220231
@_marker public protocol Copyable {}
221232

222233
@_documentation(visibility: internal)

0 commit comments

Comments
 (0)