Skip to content

Commit 585ba57

Browse files
[docs] Minor cleanup and consistency fixes in UnderscoredAttributes.md.
1 parent 297bc92 commit 585ba57

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

docs/ReferenceGuides/UnderscoredAttributes.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ extension Text {
103103
}
104104
```
105105

106-
## `@_dynamicReplacement(for:)`
106+
## `@_dynamicReplacement(for: targetFunc(label:))`
107107

108108
Marks a function as the dynamic replacement for another `dynamic` function.
109109
This is similar to method swizzling in other languages such as Objective-C,
110110
except that the replacement happens at program start (or loading a shared
111111
library), instead of at an arbitrary point in time.
112112

113113
For more details, see the forum post on
114-
[Dynamic method replacement](https://forums.swift.org/t/dynamic-method-replacement/16619).
114+
[dynamic method replacement](https://forums.swift.org/t/dynamic-method-replacement/16619).
115115

116116
## `@_distributedActorIndependent`
117117

@@ -142,7 +142,7 @@ This attribute is most commonly used by overlays.
142142

143143
```swift
144144
// module M
145-
func f() {}
145+
public func f() {}
146146

147147
// module N
148148
@_exported import M
@@ -278,11 +278,6 @@ of the closure. This is different from the typical behavior, where the closure
278278
may be runnable anywhere unless its type specifically declares that it will
279279
run on a specific actor.
280280

281-
This new attribute can be used on parameters of `@Sendable async` type
282-
to indicate that the closures arguments passed to such parameters
283-
should inherit the actor context where they are formed, which is not
284-
the normal behavior for `@Sendable` closures.
285-
286281
## `@_inheritsConvenienceInitializers`
287282

288283
An attribute that signals that a class declaration inherits its convenience
@@ -297,7 +292,6 @@ Indicates that a protocol is a marker protocol. Marker protocols represent some
297292
meaningful property at compile-time but have no runtime representation.
298293

299294
For more details, see [SE-0302](https://github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md#marker-protocols), which introduces marker protocols.
300-
301295
At the moment, the language only has one marker protocol: `Sendable`.
302296

303297
Fun fact: Rust has a very similar concept called

0 commit comments

Comments
 (0)