@@ -141,48 +141,6 @@ static bool usesFeatureSpecializeAttributeWithAvailability(Decl *decl) {
141
141
return false ;
142
142
}
143
143
144
- static bool usesFeatureMoveOnly (Decl *decl) {
145
- if (auto *extension = dyn_cast<ExtensionDecl>(decl)) {
146
- if (auto *nominal = extension->getExtendedNominal ())
147
- return usesFeatureMoveOnly (nominal);
148
- return false ;
149
- }
150
-
151
- auto hasInverseInType = [&](Type type) {
152
- return type.findIf ([&](Type type) -> bool {
153
- if (auto *NTD = type->getAnyNominal ()) {
154
- if (NTD->getAttrs ().hasAttribute <MoveOnlyAttr>())
155
- return true ;
156
- }
157
- return false ;
158
- });
159
- };
160
-
161
- if (auto *TD = dyn_cast<TypeDecl>(decl)) {
162
- if (auto *alias = dyn_cast<TypeAliasDecl>(TD))
163
- return hasInverseInType (alias->getUnderlyingType ());
164
-
165
- if (auto *NTD = dyn_cast<NominalTypeDecl>(TD)) {
166
- if (NTD->getAttrs ().hasAttribute <MoveOnlyAttr>())
167
- return true ;
168
- }
169
-
170
- return false ;
171
- }
172
-
173
- if (auto *VD = dyn_cast<ValueDecl>(decl)) {
174
- return hasInverseInType (VD->getInterfaceType ());
175
- }
176
-
177
- return false ;
178
- }
179
-
180
- static bool usesFeatureMoveOnlyResilientTypes (Decl *decl) {
181
- if (auto *nomDecl = dyn_cast<NominalTypeDecl>(decl))
182
- return nomDecl->isResilient () && usesFeatureMoveOnly (decl);
183
- return false ;
184
- }
185
-
186
144
static bool hasParameterPacks (Decl *decl) {
187
145
if (auto genericContext = decl->getAsGenericContext ()) {
188
146
auto sig = genericContext->getGenericSignature ();
@@ -341,29 +299,15 @@ static bool usesFeatureSymbolLinkageMarkers(Decl *decl) {
341
299
}
342
300
343
301
UNINTERESTING_FEATURE (LazyImmediate)
344
-
345
- static bool usesFeatureMoveOnlyClasses(Decl *decl) {
346
- return isa<ClassDecl>(decl) && usesFeatureMoveOnly (decl);
347
- }
302
+ UNINTERESTING_FEATURE(MoveOnlyClasses)
348
303
349
304
static bool usesFeatureNoImplicitCopy(Decl *decl) {
350
305
return decl->isNoImplicitCopy ();
351
306
}
352
307
353
308
UNINTERESTING_FEATURE (OldOwnershipOperatorSpellings)
354
-
355
- static bool usesFeatureMoveOnlyEnumDeinits(Decl *decl) {
356
- if (auto *ei = dyn_cast<EnumDecl>(decl)) {
357
- return usesFeatureMoveOnly (ei) && ei->getValueTypeDestructor ();
358
- }
359
- return false ;
360
- }
361
-
309
+ UNINTERESTING_FEATURE(MoveOnlyEnumDeinits)
362
310
UNINTERESTING_FEATURE(MoveOnlyTuples)
363
-
364
- // Partial consumption does not affect declarations directly.
365
- UNINTERESTING_FEATURE(MoveOnlyPartialConsumption)
366
-
367
311
UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
368
312
369
313
UNINTERESTING_FEATURE(OneWayClosureParameters)
0 commit comments