@@ -832,22 +832,22 @@ class LetValueInitialization : public Initialization {
832
832
ConsumableAndAssignable);
833
833
}
834
834
835
- // Otherwise, if we do not have a no implicit copy variable, just follow
836
- // the "normal path": perform a lexical borrow if the lifetime is lexical.
837
- if (!vd->isNoImplicitCopy ()) {
838
- return SGF.B .createBeginBorrow (
835
+ // If we have a no implicit copy lexical, emit the instruction stream so
836
+ // that the move checker knows to check this variable.
837
+ if (vd->isNoImplicitCopy ()) {
838
+ value = SGF.B .createMoveValue (PrologueLoc, value, /* IisLexical*/ true , /* hasPointerEscape=*/ false , /* fromVarDecl=*/ true );
839
+ value = SGF.B .createOwnedCopyableToMoveOnlyWrapperValue (PrologueLoc, value);
840
+ return SGF.B .createMarkUnresolvedNonCopyableValueInst (
839
841
PrologueLoc, value,
840
- /* isLexical=*/ SGF.F .getLifetime (vd, value->getType ()).isLexical (),
841
- /* hasPointerEscape=*/ false , /* fromVarDecl=*/ true );
842
+ MarkUnresolvedNonCopyableValueInst::CheckKind::ConsumableAndAssignable);
842
843
}
843
844
844
- // If we have a no implicit copy lexical, emit the instruction stream so
845
- // that the move checker knows to check this variable.
846
- value = SGF.B .createMoveValue (PrologueLoc, value, /* IisLexical*/ true , /* hasPointerEscape=*/ false , /* fromVarDecl=*/ true );
847
- value = SGF.B .createOwnedCopyableToMoveOnlyWrapperValue (PrologueLoc, value);
848
- return SGF.B .createMarkUnresolvedNonCopyableValueInst (
845
+ // Otherwise, if we do not have a no implicit copy variable, just follow
846
+ // the "normal path": perform a lexical borrow if the lifetime is lexical.
847
+ return SGF.B .createBeginBorrow (
849
848
PrologueLoc, value,
850
- MarkUnresolvedNonCopyableValueInst::CheckKind::ConsumableAndAssignable);
849
+ /* isLexical=*/ SGF.F .getLifetime (vd, value->getType ()).isLexical (),
850
+ /* hasPointerEscape=*/ false , /* fromVarDecl=*/ true );
851
851
}
852
852
853
853
void bindValue (SILValue value, SILGenFunction &SGF, bool wasPlusOne,
0 commit comments