Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ let package = Package(
] + wasiLibcCSettings,
swiftSettings: [
.enableExperimentalFeature("VariadicGenerics"),
.enableExperimentalFeature("LifetimeDependence"),
.enableExperimentalFeature("Lifetimes"),
.enableExperimentalFeature("AddressableTypes"),
.enableExperimentalFeature("AllowUnsafeAttribute"),
.enableExperimentalFeature("BuiltinModule"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/FoundationEssentials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ endif()

target_compile_options(FoundationEssentials PRIVATE
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend VariadicGenerics>"
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend LifetimeDependence>"
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend Lifetimes>"
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend AddressableTypes>"
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend BuiltinModule>"
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend AccessLevelOnImport>"
Expand Down
8 changes: 4 additions & 4 deletions Sources/FoundationEssentials/Data/Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
@_alwaysEmitIntoClient
public var bytes: RawSpan {
@lifetime(borrow self)
@_lifetime(borrow self)
borrowing get {
let buffer: UnsafeRawBufferPointer
switch _representation {
Expand Down Expand Up @@ -2240,7 +2240,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
@_alwaysEmitIntoClient
public var span: Span<UInt8> {
@lifetime(borrow self)
@_lifetime(borrow self)
borrowing get {
let span = unsafe bytes._unsafeView(as: UInt8.self)
return _overrideLifetime(span, borrowing: self)
Expand All @@ -2250,7 +2250,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
@_alwaysEmitIntoClient
public var mutableBytes: MutableRawSpan {
@lifetime(&self)
@_lifetime(&self)
mutating get {
let buffer: UnsafeMutableRawBufferPointer
switch _representation {
Expand Down Expand Up @@ -2286,7 +2286,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
@_alwaysEmitIntoClient
public var mutableSpan: MutableSpan<UInt8> {
@lifetime(&self)
@_lifetime(&self)
mutating get {
#if false // see https://github.com/swiftlang/swift/issues/81218
var bytes = mutableBytes
Expand Down
Loading