AST: Promote AssociatedTypeImplements feature to baseline.

This commit is contained in:
Allan Shortlidge
2024-07-09 10:03:24 -07:00
parent b71e73d04c
commit 45f3e94b46
12 changed files with 1 additions and 50 deletions

View File

@@ -189,7 +189,7 @@ BASELINE_LANGUAGE_FEATURE(Extern, 0, "@_extern")
BASELINE_LANGUAGE_FEATURE(ExpressionMacroDefaultArguments, 422, "Expression macro as caller-side default argument")
BASELINE_LANGUAGE_FEATURE(BuiltinStoreRaw, 0, "Builtin.storeRaw")
BASELINE_LANGUAGE_FEATURE(BuiltinCreateTask, 0, "Builtin.createTask and Builtin.createDiscardingTask")
SUPPRESSIBLE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on associated types")
BASELINE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on associated types")
LANGUAGE_FEATURE(BuiltinAddressOfRawLayout, 0, "Builtin.addressOfRawLayout")
BASELINE_LANGUAGE_FEATURE(MoveOnlyPartialConsumption, 429, "Partial consumption of noncopyable values")
BASELINE_LANGUAGE_FEATURE(BitwiseCopyable, 426, "BitwiseCopyable protocol")

View File

@@ -3048,14 +3048,6 @@ suppressingFeatureSendingArgsAndResults(PrintOptions &options,
action();
}
static void suppressingFeatureAssociatedTypeImplements(PrintOptions &options,
llvm::function_ref<void()> action) {
unsigned originalExcludeAttrCount = options.ExcludeAttrList.size();
options.ExcludeAttrList.push_back(DeclAttrKind::Implements);
action();
options.ExcludeAttrList.resize(originalExcludeAttrCount);
}
static void
suppressingFeatureBitwiseCopyable2(PrintOptions &options,
llvm::function_ref<void()> action) {

View File

@@ -63,10 +63,6 @@ static bool usesFeatureSpecializeAttributeWithAvailability(Decl *decl) {
return false;
}
static bool usesFeatureAssociatedTypeImplements(Decl *decl) {
return isa<TypeDecl>(decl) && decl->getAttrs().hasAttribute<ImplementsAttr>();
}
UNINTERESTING_FEATURE(BuiltinAddressOfRawLayout)
// ----------------------------------------------------------------------------

View File

@@ -94,10 +94,6 @@ extension AsyncCompactMapSequence: AsyncSequence {
public struct Iterator: AsyncIteratorProtocol {
public typealias Element = ElementOfResult
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -81,10 +81,6 @@ extension AsyncDropFirstSequence: AsyncSequence {
/// The iterator that produces elements of the drop-first sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -90,10 +90,6 @@ extension AsyncDropWhileSequence: AsyncSequence {
/// The iterator that produces elements of the drop-while sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -80,10 +80,6 @@ extension AsyncFilterSequence: AsyncSequence {
/// The iterator that produces elements of the filter sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -197,10 +197,6 @@ extension AsyncFlatMapSequence: AsyncSequence {
/// The iterator that produces elements of the flat map sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -90,10 +90,6 @@ extension AsyncMapSequence: AsyncSequence {
/// The iterator that produces elements of the map sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -81,10 +81,6 @@ extension AsyncPrefixSequence: AsyncSequence {
/// The iterator that produces elements of the prefix sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var baseIterator: Base.AsyncIterator

View File

@@ -85,10 +85,6 @@ extension AsyncPrefixWhileSequence: AsyncSequence {
/// The iterator that produces elements of the prefix-while sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure
@usableFromInline
var predicateHasFailed = false

View File

@@ -11,14 +11,9 @@ public struct SequenceAdapter<Base: AsyncSequence>: AsyncSequence {
// CHECK: @available{{.*}}macOS 10.15
// CHECK-NEXT: public typealias Element = Base.Element
// CHECK: #if compiler(>=5.3) && $AssociatedTypeImplements
// CHECK: @available(
// CHECK: @_implements(_Concurrency.AsyncIteratorProtocol, Failure)
// CHECK-SAME: public typealias __AsyncIteratorProtocol_Failure = Base.Failure
// CHECK-NEXT: #else
// CHECK-NOT: @_implements
// CHECK: public typealias __AsyncIteratorProtocol_Failure = Base.Failure
// CHECK-NEXT: #endif
public typealias Element = Base.Element
public struct AsyncIterator: AsyncIteratorProtocol {