Skip to content

Commit b8441c1

Browse files
committed
AST: Re-baseline ValueGenerics feature.
1 parent 49dcbb7 commit b8441c1

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ LANGUAGE_FEATURE(IsolatedAny2, 431, "@isolated(any) function types")
255255
LANGUAGE_FEATURE(ObjCImplementation, 436, "@objc @implementation extensions")
256256
LANGUAGE_FEATURE(NonescapableTypes, 446, "Nonescapable types")
257257
SUPPRESSIBLE_LANGUAGE_FEATURE(MemorySafetyAttributes, 458, "@unsafe attribute")
258-
LANGUAGE_FEATURE(ValueGenerics, 452, "Value generics feature (integer generics)")
259258
BASELINE_LANGUAGE_FEATURE(BuiltinEmplaceTypedThrows, 0, "Builtin.emplace typed throws")
259+
BASELINE_LANGUAGE_FEATURE(ValueGenerics, 452, "Value generics feature (integer generics)")
260260
LANGUAGE_FEATURE(RawIdentifiers, 451, "Raw identifiers")
261261
LANGUAGE_FEATURE(SendableCompletionHandlers, 463, "Objective-C completion handler parameters are imported as @Sendable")
262262
LANGUAGE_FEATURE(AsyncExecutionBehaviorAttributes, 0, "@concurrent and nonisolated(nonsending)")

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -506,22 +506,6 @@ bool swift::usesFeatureIsolatedDeinit(const Decl *decl) {
506506
}
507507
}
508508

509-
static bool usesFeatureValueGenerics(Decl *decl) {
510-
auto genericContext = decl->getAsGenericContext();
511-
512-
if (!genericContext || !genericContext->getGenericParams())
513-
return false;
514-
515-
for (auto param : genericContext->getGenericParams()->getParams()) {
516-
if (param->isValue())
517-
return true;
518-
519-
continue;
520-
}
521-
522-
return false;
523-
}
524-
525509
class UsesTypeValueExpr : public ASTWalker {
526510
public:
527511
bool used = false;

0 commit comments

Comments
 (0)