Skip to content

Commit 2a479ac

Browse files
committed
[Feature] NFC: Rename ADOPTABLE_ with MIGRATABLE_ to match the proposal
1 parent 5d36643 commit 2a479ac

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

include/swift/Basic/Features.def

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,36 +121,36 @@
121121
LANGUAGE_FEATURE(FeatureName, SENumber, Description)
122122
#endif
123123

124-
// An upcoming feature that supports adoption mode.
124+
// An upcoming feature that supports migration mode.
125125
//
126126
// If the feature is source-breaking and provides for a
127-
// mechanical code migration, it should implement adoption mode.
127+
// mechanical code migration, it should implement migration mode.
128128
//
129-
// Adoption mode is a feature-oriented code migration mechanism: a mode
129+
// Migration mode is a feature-oriented code migration mechanism: a mode
130130
// of operation that should produce compiler warnings with attached
131131
// fix-its that can be applied to preserve the behavior of the code once
132132
// the upcoming feature is enacted.
133133
// These warnings must belong to a diagnostic group named after the
134-
// feature. Adoption mode itself *and* the fix-its it produces must be
134+
// feature. Migration mode itself *and* the fix-its it produces must be
135135
// source and binary compatible with how the code is compiled when the
136136
// feature is disabled.
137-
#ifndef ADOPTABLE_UPCOMING_FEATURE
137+
#ifndef MIGRATABLE_UPCOMING_FEATURE
138138
#if defined(UPCOMING_FEATURE)
139-
#define ADOPTABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
139+
#define MIGRATABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
140140
UPCOMING_FEATURE(FeatureName, SENumber, Version)
141141
#else
142-
#define ADOPTABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
142+
#define MIGRATABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
143143
LANGUAGE_FEATURE(FeatureName, SENumber, #FeatureName)
144144
#endif
145145
#endif
146146

147-
// See `ADOPTABLE_UPCOMING_FEATURE`.
148-
#ifndef ADOPTABLE_EXPERIMENTAL_FEATURE
147+
// See `MIGRATABLE_UPCOMING_FEATURE`.
148+
#ifndef MIGRATABLE_EXPERIMENTAL_FEATURE
149149
#if defined(EXPERIMENTAL_FEATURE)
150-
#define ADOPTABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
150+
#define MIGRATABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
151151
EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd)
152152
#else
153-
#define ADOPTABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
153+
#define MIGRATABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
154154
LANGUAGE_FEATURE(FeatureName, 0, #FeatureName)
155155
#endif
156156
#endif
@@ -276,11 +276,11 @@ UPCOMING_FEATURE(NonfrozenEnumExhaustivity, 192, 6)
276276
UPCOMING_FEATURE(GlobalActorIsolatedTypesUsability, 0434, 6)
277277

278278
// Swift 7
279-
ADOPTABLE_UPCOMING_FEATURE(ExistentialAny, 335, 7)
279+
MIGRATABLE_UPCOMING_FEATURE(ExistentialAny, 335, 7)
280280
UPCOMING_FEATURE(InternalImportsByDefault, 409, 7)
281281
UPCOMING_FEATURE(MemberImportVisibility, 444, 7)
282282
UPCOMING_FEATURE(InferIsolatedConformances, 470, 7)
283-
ADOPTABLE_UPCOMING_FEATURE(NonisolatedNonsendingByDefault, 461, 7)
283+
MIGRATABLE_UPCOMING_FEATURE(NonisolatedNonsendingByDefault, 461, 7)
284284

285285
// Optional language features / modes
286286

@@ -520,8 +520,8 @@ SUPPRESSIBLE_EXPERIMENTAL_FEATURE(ExtensibleAttribute, false)
520520
#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE
521521
#undef EXPERIMENTAL_FEATURE
522522
#undef UPCOMING_FEATURE
523-
#undef ADOPTABLE_UPCOMING_FEATURE
524-
#undef ADOPTABLE_EXPERIMENTAL_FEATURE
523+
#undef MIGRATABLE_UPCOMING_FEATURE
524+
#undef MIGRATABLE_EXPERIMENTAL_FEATURE
525525
#undef BASELINE_LANGUAGE_FEATURE
526526
#undef OPTIONAL_LANGUAGE_FEATURE
527527
#undef CONDITIONALLY_SUPPRESSIBLE_EXPERIMENTAL_FEATURE

lib/Basic/Feature.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ std::optional<unsigned> Feature::getLanguageVersion() const {
7171

7272
bool Feature::isAdoptable() const {
7373
switch (kind) {
74-
#define ADOPTABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version)
75-
#define ADOPTABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd)
74+
#define MIGRATABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version)
75+
#define MIGRATABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd)
7676
#define LANGUAGE_FEATURE(FeatureName, SENumber, Description) \
7777
case Feature::FeatureName:
7878
#include "swift/Basic/Features.def"
7979
return false;
8080
#define LANGUAGE_FEATURE(FeatureName, SENumber, Description)
81-
#define ADOPTABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
81+
#define MIGRATABLE_UPCOMING_FEATURE(FeatureName, SENumber, Version) \
8282
case Feature::FeatureName:
83-
#define ADOPTABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
83+
#define MIGRATABLE_EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \
8484
case Feature::FeatureName:
8585
#include "swift/Basic/Features.def"
8686
return true;

0 commit comments

Comments
 (0)