Skip to content

Commit a52c060

Browse files
committed
[stdlib] dependsOn → @Lifetime
1 parent b9d7206 commit a52c060

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stdlib/public/core/CompilerProtocols.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ public protocol CaseIterable {
268268
/// purposes is discouraged.
269269
public protocol ExpressibleByNilLiteral: ~Copyable, ~Escapable {
270270
/// Creates an instance initialized with `nil`.
271-
init(nilLiteral: ()) -> dependsOn(immortal) Self
271+
@lifetime(immortal)
272+
init(nilLiteral: ())
272273
}
273274

274275
public protocol _ExpressibleByBuiltinIntegerLiteral {

stdlib/public/core/Optional.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ extension Optional: ExpressibleByNilLiteral where Wrapped: ~Copyable & ~Escapabl
155155
/// initializer behind the scenes.
156156
@_transparent
157157
@_preInverseGenerics
158-
public init(nilLiteral: ()) -> dependsOn(immortal) Self {
158+
@lifetime(immortal)
159+
public init(nilLiteral: ()) {
159160
self = .none
160161
}
161162
}

0 commit comments

Comments
 (0)