mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Implement consuming and borrowing declaration-level modifiers from SE-0377.
`borrowing func`/`consuming func` control the ownership convention of `self` for methods.
This commit is contained in:
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 746; // `consuming` and `borrowing` parameter modifiers
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 747; // `consuming` and `borrowing` decl modifiers
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -405,9 +405,11 @@ using MetatypeRepresentationField = BCFixed<2>;
|
||||
enum class SelfAccessKind : uint8_t {
|
||||
NonMutating = 0,
|
||||
Mutating,
|
||||
LegacyConsuming,
|
||||
Consuming,
|
||||
Borrowing
|
||||
};
|
||||
using SelfAccessKindField = BCFixed<2>;
|
||||
using SelfAccessKindField = BCFixed<3>;
|
||||
|
||||
/// Translates an operator decl fixity to a Serialization fixity, whose values
|
||||
/// are guaranteed to be stable.
|
||||
|
||||
Reference in New Issue
Block a user