Skip to content

Commit 927f483

Browse files
authored
Merge pull request swiftlang#74915 from gottesmm/release/6.0-rdar130253724-remove-transferring
[6.0][sending] Remove transferring.
2 parents 036cf8b + 30bae71 commit 927f483

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+68
-834
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ class TargetExtendedFunctionTypeFlags {
11971197
// Values for the enumerated isolation kinds
11981198
IsolatedAny = 0x00000002U,
11991199

1200-
// Values if we have a transferring result.
1200+
// Values if we have a sending result.
12011201
HasSendingResult = 0x00000010U,
12021202

12031203
/// A InvertibleProtocolSet in the high bits.

include/swift/AST/ASTBridging.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,6 @@ enum ENUM_EXTENSIBILITY_ATTR(open) BridgedAttributedTypeSpecifier : size_t {
15511551
BridgedAttributedTypeSpecifierConst,
15521552
BridgedAttributedTypeSpecifierIsolated,
15531553
BridgedAttributedTypeSpecifierResultDependsOn,
1554-
BridgedAttributedTypeSpecifierTransferring,
15551554
BridgedAttributedTypeSpecifierSending,
15561555
};
15571556

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,19 +2203,10 @@ ERROR(lifetime_dependence_invalid_init_return, PointsToFirstBadToken,
22032203
"specifiers",
22042204
())
22052205

2206-
ERROR(transferring_after_parameter_specifier,none,
2207-
"'transferring' must be placed before specifier '%0'", (StringRef))
2208-
ERROR(transferring_repeated,none,
2209-
"parameter may have at most one 'transferring' specifier", ())
22102206
ERROR(sending_before_parameter_specifier,none,
22112207
"'sending' must be placed after specifier '%0'", (StringRef))
22122208
ERROR(sending_repeated,none,
22132209
"parameter may have at most one 'sending' specifier", ())
2214-
ERROR(sending_and_transferring_used_together,none,
2215-
"'transferring' and 'sending' may not be used together", ())
2216-
WARNING(transferring_is_now_sendable,none,
2217-
"'transferring' has been renamed to 'sending' and the 'transferring' spelling will be removed shortly",
2218-
())
22192210
ERROR(sending_cannot_be_used_with_borrowing,none,
22202211
"'%0' cannot be used together with 'borrowing'", (StringRef))
22212212

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7937,16 +7937,9 @@ ERROR(lifetime_dependence_cannot_infer_ambiguous_candidate, none,
79377937
())
79387938

79397939
//===----------------------------------------------------------------------===//
7940-
// MARK: Transferring
7940+
// MARK: Sending
79417941
//===----------------------------------------------------------------------===//
79427942

7943-
ERROR(transferring_unsupported_param_specifier, none,
7944-
"'%0' cannot be applied to a 'transferring' parameter", (StringRef))
7945-
7946-
ERROR(transferring_only_on_parameters_and_results, none,
7947-
"'transferring' may only be used on parameters and results", ())
7948-
ERROR(transferring_cannot_be_applied_to_tuple_elt, none,
7949-
"'transferring' cannot be applied to tuple elements", ())
79507943
ERROR(sending_unsupported_param_specifier, none,
79517944
"'%0' cannot be applied to a 'sending' parameter", (StringRef))
79527945
ERROR(sending_only_on_parameters_and_results, none,

include/swift/AST/ExtInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,15 @@ class ASTExtInfoBuilder {
486486
DifferentiabilityKind::NonDifferentiable, nullptr,
487487
FunctionTypeIsolation::forNonIsolated(),
488488
LifetimeDependenceInfo(),
489-
false /*transferringResult*/) {}
489+
false /*sendingResult*/) {}
490490

491491
// Constructor for polymorphic type.
492492
ASTExtInfoBuilder(Representation rep, bool throws, Type thrownError)
493493
: ASTExtInfoBuilder(rep, false, throws, thrownError,
494494
DifferentiabilityKind::NonDifferentiable, nullptr,
495495
FunctionTypeIsolation::forNonIsolated(),
496496
LifetimeDependenceInfo(),
497-
false /*transferringResult*/) {}
497+
false /*sendingResult*/) {}
498498

499499
// Constructor with no defaults.
500500
ASTExtInfoBuilder(Representation rep, bool isNoEscape, bool throws,

include/swift/AST/TypeRepr.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,6 @@ class SpecifierTypeRepr : public TypeRepr {
11161116
T->getKind() == TypeReprKind::CompileTimeConst ||
11171117
T->getKind() == TypeReprKind::ResultDependsOn ||
11181118
T->getKind() == TypeReprKind::LifetimeDependentReturn ||
1119-
T->getKind() == TypeReprKind::Transferring ||
11201119
T->getKind() == TypeReprKind::Sending;
11211120
}
11221121
static bool classof(const SpecifierTypeRepr *T) { return true; }
@@ -1203,21 +1202,6 @@ class ResultDependsOnTypeRepr : public SpecifierTypeRepr {
12031202
static bool classof(const ResultDependsOnTypeRepr *T) { return true; }
12041203
};
12051204

1206-
/// A transferring type.
1207-
/// \code
1208-
/// x : transferring Int
1209-
/// \endcode
1210-
class TransferringTypeRepr : public SpecifierTypeRepr {
1211-
public:
1212-
TransferringTypeRepr(TypeRepr *Base, SourceLoc InOutLoc)
1213-
: SpecifierTypeRepr(TypeReprKind::Transferring, Base, InOutLoc) {}
1214-
1215-
static bool classof(const TypeRepr *T) {
1216-
return T->getKind() == TypeReprKind::Transferring;
1217-
}
1218-
static bool classof(const TransferringTypeRepr *T) { return true; }
1219-
};
1220-
12211205
/// A sending type.
12221206
/// \code
12231207
/// x : sending Int
@@ -1633,7 +1617,6 @@ inline bool TypeRepr::isSimple() const {
16331617
case TypeReprKind::Array:
16341618
case TypeReprKind::SILBox:
16351619
case TypeReprKind::Isolated:
1636-
case TypeReprKind::Transferring:
16371620
case TypeReprKind::Sending:
16381621
case TypeReprKind::Placeholder:
16391622
case TypeReprKind::CompileTimeConst:

include/swift/AST/TypeReprNodes.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ ABSTRACT_TYPEREPR(Specifier, TypeRepr)
7171
SPECIFIER_TYPEREPR(Isolated, SpecifierTypeRepr)
7272
SPECIFIER_TYPEREPR(CompileTimeConst, SpecifierTypeRepr)
7373
SPECIFIER_TYPEREPR(ResultDependsOn, SpecifierTypeRepr)
74-
SPECIFIER_TYPEREPR(Transferring, SpecifierTypeRepr)
7574
SPECIFIER_TYPEREPR(Sending, SpecifierTypeRepr)
7675
TYPEREPR(Fixed, TypeRepr)
7776
TYPEREPR(SILBox, TypeRepr)

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2434,7 +2434,7 @@ class YieldTypeFlags {
24342434
/*isolated*/ false, /*noDerivative*/ false,
24352435
/*compileTimeConst*/ false,
24362436
/*hasResultDependsOn*/ false,
2437-
/*is transferring*/ false);
2437+
/*is sending*/ false);
24382438
}
24392439

24402440
bool operator ==(const YieldTypeFlags &other) const {

include/swift/Basic/Features.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ SUPPRESSIBLE_LANGUAGE_FEATURE(ConformanceSuppression, 426, "Suppressible inferre
197197
SUPPRESSIBLE_LANGUAGE_FEATURE(BitwiseCopyable2, 426, "BitwiseCopyable feature")
198198
LANGUAGE_FEATURE(BodyMacros, 415, "Function body macros")
199199
LANGUAGE_FEATURE(BuiltinAddressOfRawLayout, 0, "Builtin.addressOfRawLayout")
200-
LANGUAGE_FEATURE(TransferringArgsAndResults, 430, "Transferring args and results")
201200
SUPPRESSIBLE_LANGUAGE_FEATURE(SendingArgsAndResults, 430, "Sending arg and results")
202201
LANGUAGE_FEATURE(BorrowingSwitch, 432, "Noncopyable type pattern matching")
203202
CONDITIONALLY_SUPPRESSIBLE_LANGUAGE_FEATURE(IsolatedAny, 431, "@isolated(any) function types")

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,11 +1352,6 @@ def disable_experimental_parser_round_trip : Flag<["-"],
13521352
"disable-experimental-parser-round-trip">,
13531353
HelpText<"Disable round trip through the new swift parser">;
13541354

1355-
def disable_transferring_args_and_results_with_region_isolation : Flag<["-"],
1356-
"disable-transferring-args-and-results-with-region-based-isolation">,
1357-
HelpText<"Disable transferring args and results when region based isolation is enabled. Only enabled with asserts">,
1358-
Flags<[HelpHidden]>;
1359-
13601355
def disable_sending_args_and_results_with_region_isolation : Flag<["-"],
13611356
"disable-sending-args-and-results-with-region-based-isolation">,
13621357
HelpText<"Disable sending args and results when region based isolation is enabled. Only enabled with asserts">,

0 commit comments

Comments
 (0)