Skip to content

Commit 2637c41

Browse files
committed
[stdlib] Explicitly annotate with releasenone.
Annotated all functions with arguments that are consumed and are annotated `@_effects(readnone)` or `@_effects(readonly)` with `@_effects(releasenone)`.
1 parent 2ca262c commit 2637c41

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

stdlib/public/core/ArrayShared.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func _deallocateUninitializedArray<Element>(
6868
#if !INTERNAL_CHECKS_ENABLED
6969
@_alwaysEmitIntoClient
7070
@_semantics("array.finalize_intrinsic")
71-
@_effects(readnone)
71+
@_effects(readnone) @_effects(releasenone)
7272
@_effects(escaping array.value** => return.value**)
7373
@_effects(escaping array.value**.class*.value** => return.value**.class*.value**)
7474
public // COMPILER_INTRINSIC

stdlib/public/core/SmallString.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ extension _SmallString {
345345
extension _SmallString {
346346
// Resiliently create from a tagged cocoa string
347347
//
348-
@_effects(readonly) // @opaque
348+
@_effects(readonly) @_effects(releasenone) // @opaque
349349
@usableFromInline // testable
350350
internal init?(taggedCocoa cocoa: AnyObject) {
351351
self.init()
@@ -367,7 +367,7 @@ extension _SmallString {
367367
self._invariantCheck()
368368
}
369369

370-
@_effects(readonly) // @opaque
370+
@_effects(readonly) @_effects(releasenone) // @opaque
371371
internal init?(taggedASCIICocoa cocoa: AnyObject) {
372372
self.init()
373373
var success = true

stdlib/public/core/StringInterpolation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ extension String {
230230
/// print(message)
231231
/// // Prints "If one cookie costs 2 dollars, 3 cookies cost 6 dollars."
232232
@inlinable
233-
@_effects(readonly)
233+
@_effects(readonly) @_effects(releasenone)
234234
public init(stringInterpolation: DefaultStringInterpolation) {
235235
self = stringInterpolation.make()
236236
}
@@ -254,7 +254,7 @@ extension Substring {
254254
/// print(message)
255255
/// // Prints "If one cookie costs 2 dollars, 3 cookies cost 6 dollars."
256256
@inlinable
257-
@_effects(readonly)
257+
@_effects(readonly) @_effects(releasenone)
258258
public init(stringInterpolation: DefaultStringInterpolation) {
259259
self.init(stringInterpolation.make())
260260
}

0 commit comments

Comments
 (0)