mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
trifurcate the MoveOnly feature
I want to reserve Feature::MoveOnly only for move-only types and other things that are part of SE-390. Other prototyped features like noimplicitcopy and some older names for consume were left behind as guarded by this Feature. That's really not the right way to do it, as people will expect that the feature is enabled all the time, which would put those unofficial features into on-by-default. So this change introduces two new Features to guard those unofficial features.
This commit is contained in:
@@ -721,8 +721,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.Features.insert(Feature::NamedOpaqueTypes);
|
||||
if (Args.hasArg(OPT_enable_experimental_flow_sensitive_concurrent_captures))
|
||||
Opts.Features.insert(Feature::FlowSensitiveConcurrencyCaptures);
|
||||
if (Args.hasArg(OPT_enable_experimental_move_only))
|
||||
if (Args.hasArg(OPT_enable_experimental_move_only)) {
|
||||
// FIXME: drop addition of Feature::MoveOnly once its queries are gone.
|
||||
Opts.Features.insert(Feature::MoveOnly);
|
||||
Opts.Features.insert(Feature::NoImplicitCopy);
|
||||
Opts.Features.insert(Feature::OldOwnershipOperatorSpellings);
|
||||
}
|
||||
if (Args.hasArg(OPT_experimental_one_way_closure_params))
|
||||
Opts.Features.insert(Feature::OneWayClosureParameters);
|
||||
if (Args.hasArg(OPT_enable_experimental_associated_type_inference))
|
||||
|
||||
Reference in New Issue
Block a user