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 3dc0e622bac5576bdb29ab343b46f6492dd4b9ff)
This commit is contained in:
Andrew Trick
2025-06-24 18:23:36 -07:00
parent e78d7349d7
commit 8514a4c297
2 changed files with 2 additions and 4 deletions

View File

@@ -266,6 +266,7 @@ LANGUAGE_FEATURE(ValueGenericsNameLookup, 452, "Value generics appearing as stat
SUPPRESSIBLE_LANGUAGE_FEATURE(ABIAttributeSE0479, 479, "@abi attribute on functions, initializers, properties, and subscripts")
LANGUAGE_FEATURE(BuiltinSelect, 0, "Builtin.select")
LANGUAGE_FEATURE(AlwaysInheritActorContext, 472, "@_inheritActorContext(always)")
LANGUAGE_FEATURE(NonescapableAccessorOnTrivial, 0, "Support UnsafeMutablePointer.mutableSpan")
// Swift 6
UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
@@ -529,9 +530,6 @@ EXPERIMENTAL_FEATURE(DefaultIsolationPerFile, false)
/// Enable @_lifetime attribute
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(Lifetimes, true)
/// Enable UnsafeMutablePointer.mutableSpan
EXPERIMENTAL_FEATURE(NonescapableAccessorOnTrivial, true)
#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE
#undef EXPERIMENTAL_FEATURE
#undef UPCOMING_FEATURE

View File

@@ -48,7 +48,7 @@ import lifetime_dependence
// CHECK: public var span: Swift.Span<Element> {
// CHECK: @lifetime(borrow self)
// CHECK: @_alwaysEmitIntoClient get {
// CHECK: #if compiler(>=5.3) && $LifetimeDependence && $NonescapableAccessorOnTrivial
// CHECK: #if compiler(>=5.3) && $NonescapableAccessorOnTrivial && $LifetimeDependence
// CHECK: public var mutableSpan: Swift.MutableSpan<Element> {
// CHECK: @lifetime(borrow self)
// CHECK: @_alwaysEmitIntoClient get {