Skip to content

Commit 8514a4c

Browse files
committed
Promote feature NonescapableAccessorOnTrivial to be non-experimental
This flag was not experimental for any good reason; it should always be enabled. The flag only exists so we can introduce a new API: UnsafeMutablePointer.mutableSpan. Supported compilers cannot handle the new API. rdar://154247502 (Promote feature NonescapableAccessorOnTrivial to be non-experimental) (cherry picked from commit 3dc0e62)
1 parent e78d734 commit 8514a4c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ LANGUAGE_FEATURE(ValueGenericsNameLookup, 452, "Value generics appearing as stat
266266
SUPPRESSIBLE_LANGUAGE_FEATURE(ABIAttributeSE0479, 479, "@abi attribute on functions, initializers, properties, and subscripts")
267267
LANGUAGE_FEATURE(BuiltinSelect, 0, "Builtin.select")
268268
LANGUAGE_FEATURE(AlwaysInheritActorContext, 472, "@_inheritActorContext(always)")
269+
LANGUAGE_FEATURE(NonescapableAccessorOnTrivial, 0, "Support UnsafeMutablePointer.mutableSpan")
269270

270271
// Swift 6
271272
UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
@@ -529,9 +530,6 @@ EXPERIMENTAL_FEATURE(DefaultIsolationPerFile, false)
529530
/// Enable @_lifetime attribute
530531
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(Lifetimes, true)
531532

532-
/// Enable UnsafeMutablePointer.mutableSpan
533-
EXPERIMENTAL_FEATURE(NonescapableAccessorOnTrivial, true)
534-
535533
#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE
536534
#undef EXPERIMENTAL_FEATURE
537535
#undef UPCOMING_FEATURE

test/ModuleInterface/lifetime_dependence_test.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import lifetime_dependence
4848
// CHECK: public var span: Swift.Span<Element> {
4949
// CHECK: @lifetime(borrow self)
5050
// CHECK: @_alwaysEmitIntoClient get {
51-
// CHECK: #if compiler(>=5.3) && $LifetimeDependence && $NonescapableAccessorOnTrivial
51+
// CHECK: #if compiler(>=5.3) && $NonescapableAccessorOnTrivial && $LifetimeDependence
5252
// CHECK: public var mutableSpan: Swift.MutableSpan<Element> {
5353
// CHECK: @lifetime(borrow self)
5454
// CHECK: @_alwaysEmitIntoClient get {

0 commit comments

Comments
 (0)