@@ -49,7 +49,8 @@ SILValue SILGenFunction::emitSelfDeclForDestructor(VarDecl *selfDecl) {
4949 // they cannot escape.
5050 if (selfValue->getOwnershipKind () == OwnershipKind::Owned) {
5151 selfValue = B.createMarkMustCheckInst (
52- selfDecl, selfValue, MarkMustCheckInst::CheckKind::NoImplicitCopy);
52+ selfDecl, selfValue,
53+ MarkMustCheckInst::CheckKind::ConsumableAndAssignable);
5354 }
5455 }
5556
@@ -129,7 +130,7 @@ class EmitBBArguments : public CanTypeVisitor<EmitBBArguments,
129130 // check ownership.
130131 if (mv.getType ().isMoveOnly () && !mv.getType ().isMoveOnlyWrapped ())
131132 mv = SGF.B .createMarkMustCheckInst (
132- loc, mv, MarkMustCheckInst::CheckKind::NoImplicitCopy );
133+ loc, mv, MarkMustCheckInst::CheckKind::ConsumableAndAssignable );
133134 return mv;
134135 }
135136
@@ -322,7 +323,7 @@ struct ArgumentInitHelper {
322323 value = SGF.B .createMoveValue (loc, argrv.forward (SGF),
323324 /* isLexical*/ true );
324325 value = SGF.B .createMarkMustCheckInst (
325- loc, value, MarkMustCheckInst::CheckKind::NoImplicitCopy );
326+ loc, value, MarkMustCheckInst::CheckKind::ConsumableAndAssignable );
326327 SGF.emitManagedRValueWithCleanup (value);
327328 return value;
328329 }
@@ -343,7 +344,7 @@ struct ArgumentInitHelper {
343344 // use no copy.
344345 auto kind = MarkMustCheckInst::CheckKind::NoConsumeOrAssign;
345346 if (pd->isOwned ())
346- kind = MarkMustCheckInst::CheckKind::NoImplicitCopy ;
347+ kind = MarkMustCheckInst::CheckKind::ConsumableAndAssignable ;
347348 value = SGF.B .createMarkMustCheckInst (loc, value, kind);
348349 SGF.emitManagedRValueWithCleanup (value);
349350 return value;
@@ -365,7 +366,7 @@ struct ArgumentInitHelper {
365366 loc, argrv.forward (SGF));
366367 value = SGF.B .createMoveValue (loc, value, true /* is lexical*/ );
367368 value = SGF.B .createMarkMustCheckInst (
368- loc, value, MarkMustCheckInst::CheckKind::NoImplicitCopy );
369+ loc, value, MarkMustCheckInst::CheckKind::ConsumableAndAssignable );
369370 SGF.emitManagedRValueWithCleanup (value);
370371 return value;
371372 }
@@ -585,7 +586,7 @@ static void emitCaptureArguments(SILGenFunction &SGF,
585586 SILValue addr = SGF.B .createProjectBox (VD, box, 0 );
586587 if (addr->getType ().isMoveOnly ())
587588 addr = SGF.B .createMarkMustCheckInst (
588- VD, addr, MarkMustCheckInst::CheckKind::NoImplicitCopy );
589+ VD, addr, MarkMustCheckInst::CheckKind::ConsumableAndAssignable );
589590 SGF.VarLocs [VD] = SILGenFunction::VarLoc::get (addr, box);
590591 SILDebugVariable DbgVar (VD->isLet (), ArgNo);
591592 SGF.B .createDebugValueAddr (Loc, addr, DbgVar);
@@ -608,7 +609,7 @@ static void emitCaptureArguments(SILGenFunction &SGF,
608609 SILValue arg = SILValue (fArg );
609610 if (isInOut && (ty.isMoveOnly () && !ty.isMoveOnlyWrapped ())) {
610611 arg = SGF.B .createMarkMustCheckInst (
611- Loc, arg, MarkMustCheckInst::CheckKind::NoImplicitCopy );
612+ Loc, arg, MarkMustCheckInst::CheckKind::ConsumableAndAssignable );
612613 }
613614 SGF.VarLocs [VD] = SILGenFunction::VarLoc::get (arg);
614615 SILDebugVariable DbgVar (VD->isLet (), ArgNo);
0 commit comments