Skip to content

Commit c494124

Browse files
committed
Allow Builtin.Take -> ~Escapable
1 parent 9953b1e commit c494124

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/AST/Builtins.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ BUILTIN_SIL_OPERATION(LoadRaw, "loadRaw", Special)
240240
BUILTIN_SIL_OPERATION(LoadInvariant, "loadInvariant", Special)
241241

242242
/// Take has type (Builtin.RawPointer) -> T
243+
/// where T: ~Copyable & ~Escapable
243244
BUILTIN_SIL_OPERATION(Take, "take", Special)
244245

245246
/// Destroy has type (T.Type, Builtin.RawPointer) -> ()

lib/AST/Builtins.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,7 @@ static ValueDecl *getLoadOperation(ASTContext &ctx, Identifier id) {
931931

932932
static ValueDecl *getTakeOperation(ASTContext &ctx, Identifier id) {
933933
return getBuiltinFunction(ctx, id, _thin,
934-
_generics(_unrestricted,
935-
_conformsTo(_typeparam(0), _escapable)),
934+
_generics(_unrestricted),
936935
_parameters(_rawPointer),
937936
_typeparam(0));
938937
}

0 commit comments

Comments
 (0)