Skip to content

Commit 709808e

Browse files
authored
Use updated spelling for lifetime annotations. (swiftlang#1584)
1 parent c321906 commit 709808e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ let package = Package(
147147
] + wasiLibcCSettings,
148148
swiftSettings: [
149149
.enableExperimentalFeature("VariadicGenerics"),
150-
.enableExperimentalFeature("LifetimeDependence"),
150+
.enableExperimentalFeature("Lifetimes"),
151151
.enableExperimentalFeature("AddressableTypes"),
152152
.enableExperimentalFeature("AllowUnsafeAttribute"),
153153
.enableExperimentalFeature("BuiltinModule"),

Sources/FoundationEssentials/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ endif()
8282

8383
target_compile_options(FoundationEssentials PRIVATE
8484
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend VariadicGenerics>"
85-
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend LifetimeDependence>"
85+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend Lifetimes>"
8686
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend AddressableTypes>"
8787
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend BuiltinModule>"
8888
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend AccessLevelOnImport>"

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22122212
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22132213
@_alwaysEmitIntoClient
22142214
public var bytes: RawSpan {
2215-
@lifetime(borrow self)
2215+
@_lifetime(borrow self)
22162216
borrowing get {
22172217
let buffer: UnsafeRawBufferPointer
22182218
switch _representation {
@@ -2240,7 +2240,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22402240
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22412241
@_alwaysEmitIntoClient
22422242
public var span: Span<UInt8> {
2243-
@lifetime(borrow self)
2243+
@_lifetime(borrow self)
22442244
borrowing get {
22452245
let span = unsafe bytes._unsafeView(as: UInt8.self)
22462246
return _overrideLifetime(span, borrowing: self)
@@ -2250,7 +2250,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22502250
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22512251
@_alwaysEmitIntoClient
22522252
public var mutableBytes: MutableRawSpan {
2253-
@lifetime(&self)
2253+
@_lifetime(&self)
22542254
mutating get {
22552255
let buffer: UnsafeMutableRawBufferPointer
22562256
switch _representation {
@@ -2286,7 +2286,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22862286
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22872287
@_alwaysEmitIntoClient
22882288
public var mutableSpan: MutableSpan<UInt8> {
2289-
@lifetime(&self)
2289+
@_lifetime(&self)
22902290
mutating get {
22912291
#if false // see https://github.com/swiftlang/swift/issues/81218
22922292
var bytes = mutableBytes

0 commit comments

Comments
 (0)