@@ -141,48 +141,6 @@ static bool usesFeatureSpecializeAttributeWithAvailability(Decl *decl) {
141141 return false ;
142142}
143143
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-
186144static bool hasParameterPacks (Decl *decl) {
187145 if (auto genericContext = decl->getAsGenericContext ()) {
188146 auto sig = genericContext->getGenericSignature ();
@@ -341,29 +299,15 @@ static bool usesFeatureSymbolLinkageMarkers(Decl *decl) {
341299}
342300
343301UNINTERESTING_FEATURE (LazyImmediate)
344-
345- static bool usesFeatureMoveOnlyClasses(Decl *decl) {
346- return isa<ClassDecl>(decl) && usesFeatureMoveOnly (decl);
347- }
302+ UNINTERESTING_FEATURE(MoveOnlyClasses)
348303
349304static bool usesFeatureNoImplicitCopy(Decl *decl) {
350305 return decl->isNoImplicitCopy ();
351306}
352307
353308UNINTERESTING_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)
362310UNINTERESTING_FEATURE(MoveOnlyTuples)
363-
364- // Partial consumption does not affect declarations directly.
365- UNINTERESTING_FEATURE(MoveOnlyPartialConsumption)
366-
367311UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
368312
369313UNINTERESTING_FEATURE(OneWayClosureParameters)
0 commit comments