Skip to content

Commit 45f3e94

Browse files
committed
AST: Promote AssociatedTypeImplements feature to baseline.
1 parent b71e73d commit 45f3e94

12 files changed

+1
-50
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ BASELINE_LANGUAGE_FEATURE(Extern, 0, "@_extern")
189189
BASELINE_LANGUAGE_FEATURE(ExpressionMacroDefaultArguments, 422, "Expression macro as caller-side default argument")
190190
BASELINE_LANGUAGE_FEATURE(BuiltinStoreRaw, 0, "Builtin.storeRaw")
191191
BASELINE_LANGUAGE_FEATURE(BuiltinCreateTask, 0, "Builtin.createTask and Builtin.createDiscardingTask")
192-
SUPPRESSIBLE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on associated types")
192+
BASELINE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on associated types")
193193
LANGUAGE_FEATURE(BuiltinAddressOfRawLayout, 0, "Builtin.addressOfRawLayout")
194194
BASELINE_LANGUAGE_FEATURE(MoveOnlyPartialConsumption, 429, "Partial consumption of noncopyable values")
195195
BASELINE_LANGUAGE_FEATURE(BitwiseCopyable, 426, "BitwiseCopyable protocol")

lib/AST/ASTPrinter.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3048,14 +3048,6 @@ suppressingFeatureSendingArgsAndResults(PrintOptions &options,
30483048
action();
30493049
}
30503050

3051-
static void suppressingFeatureAssociatedTypeImplements(PrintOptions &options,
3052-
llvm::function_ref<void()> action) {
3053-
unsigned originalExcludeAttrCount = options.ExcludeAttrList.size();
3054-
options.ExcludeAttrList.push_back(DeclAttrKind::Implements);
3055-
action();
3056-
options.ExcludeAttrList.resize(originalExcludeAttrCount);
3057-
}
3058-
30593051
static void
30603052
suppressingFeatureBitwiseCopyable2(PrintOptions &options,
30613053
llvm::function_ref<void()> action) {

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ static bool usesFeatureSpecializeAttributeWithAvailability(Decl *decl) {
6363
return false;
6464
}
6565

66-
static bool usesFeatureAssociatedTypeImplements(Decl *decl) {
67-
return isa<TypeDecl>(decl) && decl->getAttrs().hasAttribute<ImplementsAttr>();
68-
}
69-
7066
UNINTERESTING_FEATURE(BuiltinAddressOfRawLayout)
7167

7268
// ----------------------------------------------------------------------------

stdlib/public/Concurrency/AsyncCompactMapSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ extension AsyncCompactMapSequence: AsyncSequence {
9494
public struct Iterator: AsyncIteratorProtocol {
9595
public typealias Element = ElementOfResult
9696

97-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
98-
@available(SwiftStdlib 6.0, *)
99-
public typealias Failure = Base.Failure
100-
10197
@usableFromInline
10298
var baseIterator: Base.AsyncIterator
10399

stdlib/public/Concurrency/AsyncDropFirstSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ extension AsyncDropFirstSequence: AsyncSequence {
8181

8282
/// The iterator that produces elements of the drop-first sequence.
8383
public struct Iterator: AsyncIteratorProtocol {
84-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
85-
@available(SwiftStdlib 6.0, *)
86-
public typealias Failure = Base.Failure
87-
8884
@usableFromInline
8985
var baseIterator: Base.AsyncIterator
9086

stdlib/public/Concurrency/AsyncDropWhileSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ extension AsyncDropWhileSequence: AsyncSequence {
9090

9191
/// The iterator that produces elements of the drop-while sequence.
9292
public struct Iterator: AsyncIteratorProtocol {
93-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
94-
@available(SwiftStdlib 6.0, *)
95-
public typealias Failure = Base.Failure
96-
9793
@usableFromInline
9894
var baseIterator: Base.AsyncIterator
9995

stdlib/public/Concurrency/AsyncFilterSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ extension AsyncFilterSequence: AsyncSequence {
8080

8181
/// The iterator that produces elements of the filter sequence.
8282
public struct Iterator: AsyncIteratorProtocol {
83-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
84-
@available(SwiftStdlib 6.0, *)
85-
public typealias Failure = Base.Failure
86-
8783
@usableFromInline
8884
var baseIterator: Base.AsyncIterator
8985

stdlib/public/Concurrency/AsyncFlatMapSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ extension AsyncFlatMapSequence: AsyncSequence {
197197

198198
/// The iterator that produces elements of the flat map sequence.
199199
public struct Iterator: AsyncIteratorProtocol {
200-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
201-
@available(SwiftStdlib 6.0, *)
202-
public typealias Failure = Base.Failure
203-
204200
@usableFromInline
205201
var baseIterator: Base.AsyncIterator
206202

stdlib/public/Concurrency/AsyncMapSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ extension AsyncMapSequence: AsyncSequence {
9090

9191
/// The iterator that produces elements of the map sequence.
9292
public struct Iterator: AsyncIteratorProtocol {
93-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
94-
@available(SwiftStdlib 6.0, *)
95-
public typealias Failure = Base.Failure
96-
9793
@usableFromInline
9894
var baseIterator: Base.AsyncIterator
9995

stdlib/public/Concurrency/AsyncPrefixSequence.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ extension AsyncPrefixSequence: AsyncSequence {
8181

8282
/// The iterator that produces elements of the prefix sequence.
8383
public struct Iterator: AsyncIteratorProtocol {
84-
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
85-
@available(SwiftStdlib 6.0, *)
86-
public typealias Failure = Base.Failure
87-
8884
@usableFromInline
8985
var baseIterator: Base.AsyncIterator
9086

0 commit comments

Comments
 (0)