Skip to content

Commit 1d7288e

Browse files
authored
Merge pull request #67535 from kirbyt/kirbyt/docs-fix-observable-links-112678394
Update documentation links to the Observable macro and protocol (112678394)
2 parents b0954ce + 73ded0f commit 1d7288e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

stdlib/public/Observation/Sources/Observation/Observable.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// Conforming to this protocol signals to other APIs that the type supports
1616
/// observation. However, applying the `Observable` protocol by itself to a
1717
/// type doesn't add observation functionality to the type. Instead, always use
18-
/// the ``Observation/Observable-swift.macro`` macro when adding observation
18+
/// the ``Observation/Observable()`` macro when adding observation
1919
/// support to a type.
2020
@available(SwiftStdlib 5.9, *)
2121
public protocol Observable { }
@@ -25,9 +25,8 @@ public protocol Observable { }
2525
/// Defines and implements conformance of the Observable protocol.
2626
///
2727
/// This macro adds observation support to a custom type and conforms the type
28-
/// to the ``Observation/Observable-swift.protocol`` protocol. For example, the
29-
/// following code applies the `Observable` macro to the type `Car` making it
30-
/// observable:
28+
/// to the ``Observation/Observable`` protocol. For example, the following code
29+
/// applies the `Observable` macro to the type `Car` making it observable:
3130
///
3231
/// @Observable
3332
/// class Car {

stdlib/public/Observation/Sources/Observation/ObservationRegistrar.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
/// Provides storage for tracking and access to data changes.
1313
///
1414
/// You don't need to create an instance of `ObservationRegistrar` when using
15-
/// the ``Observation/Observable-swift.macro`` macro to indicate observability
16-
/// of a type.
15+
/// the ``Observation/Observable()`` macro to indicate observability of a type.
1716
@available(SwiftStdlib 5.9, *)
1817
public struct ObservationRegistrar: Sendable {
1918
internal class ValueObservationStorage {
@@ -301,7 +300,7 @@ public struct ObservationRegistrar: Sendable {
301300
///
302301
/// You don't need to create an instance of
303302
/// ``Observation/ObservationRegistrar`` when using the
304-
/// ``Observation/Observable-swift.macro`` macro to indicate observably
303+
/// ``Observation/Observable()`` macro to indicate observably
305304
/// of a type.
306305
public init() {
307306
}

0 commit comments

Comments
 (0)