@@ -607,10 +607,8 @@ func testConsumingEscapeClosureCaptureLet(_ f: consuming @escaping () -> ()) {
607607// CHECK: } // end sil function '$s16moveonly_closure29testGlobalClosureCaptureInOutyyAA9SingleEltVzFyycfU_'
608608var globalClosureCaptureInOut : ( ) -> ( ) = { }
609609func testGlobalClosureCaptureInOut( _ x: inout SingleElt ) {
610- // expected-error @-1 {{'x' consumed but not reinitialized before end of function}}
611- // expected-note @-2 {{'x' is declared 'inout'}}
610+ // expected-note @-1 {{'x' is declared 'inout'}}
612611 globalClosureCaptureInOut = { // expected-error {{escaping closure captures 'inout' parameter 'x'}}
613- // expected-note @-1 {{consuming use here}}
614612 borrowVal ( x) // expected-note {{captured here}}
615613 consumeVal ( x) // expected-note {{captured here}}
616614 consumeVal ( x) // expected-note {{captured here}}
@@ -652,9 +650,7 @@ func testGlobalClosureCaptureInOut(_ x: inout SingleElt) {
652650// CHECK: } // end sil function '$s16moveonly_closure31testLocalLetClosureCaptureInOutyyAA9SingleEltVzFyycfU_'
653651func testLocalLetClosureCaptureInOut( _ x: inout SingleElt ) {
654652 // expected-note @-1 {{'x' is declared 'inout'}}
655- // expected-error @-2 {{'x' consumed but not reinitialized before end of function}}
656653 let f = { // expected-error {{escaping closure captures 'inout' parameter 'x'}}
657- // expected-note @-1 {{consuming use here}}
658654 borrowVal ( x) // expected-note {{captured here}}
659655 consumeVal ( x) // expected-note {{captured here}}
660656 consumeVal ( x) // expected-note {{captured here}}
@@ -700,10 +696,8 @@ func testLocalLetClosureCaptureInOut(_ x: inout SingleElt) {
700696// CHECK: apply {{%.*}}([[LOADED_READ]], [[LOADED_TAKE]])
701697// CHECK: } // end sil function '$s16moveonly_closure31testLocalVarClosureCaptureInOutyyAA9SingleEltVzFyycfU_'
702698func testLocalVarClosureCaptureInOut( _ x: inout SingleElt ) {
703- // expected-error @-1 {{'x' consumed but not reinitialized before end of function}}
704- // expected-note @-2 {{'x' is declared 'inout'}}
705- var f = { // expected-note {{consuming use here}}
706- // expected-error @-1 {{escaping closure captures 'inout' parameter 'x'}}
699+ // expected-note @-1 {{'x' is declared 'inout'}}
700+ var f = { // expected-error {{escaping closure captures 'inout' parameter 'x'}}
707701 borrowVal ( x) // expected-note {{captured here}}
708702 consumeVal ( x) // expected-note {{captured here}}
709703 consumeVal ( x) // expected-note {{captured here}}
@@ -750,10 +744,8 @@ func testLocalVarClosureCaptureInOut(_ x: inout SingleElt) {
750744// CHECK: apply {{%.*}}([[LOADED_READ]], [[LOADED_TAKE]])
751745// CHECK: } // end sil function '$s16moveonly_closure026testInOutVarClosureCapturedE0yyyycz_AA9SingleEltVztFyycfU_'
752746func testInOutVarClosureCaptureInOut( _ f: inout ( ) -> ( ) , _ x: inout SingleElt ) {
753- // expected-error @-1 {{'x' consumed but not reinitialized before end of function}}
754- // expected-note @-2 {{'x' is declared 'inout'}}
747+ // expected-note @-1 {{'x' is declared 'inout'}}
755748 f = { // expected-error {{escaping closure captures 'inout' parameter 'x'}}
756- // expected-note @-1 {{consuming use here}}
757749 borrowVal ( x) // expected-note {{captured here}}
758750 consumeVal ( x) // expected-note {{captured here}}
759751 consumeVal ( x) // expected-note {{captured here}}
@@ -805,9 +797,7 @@ func testInOutVarClosureCaptureInOut(_ f: inout () -> (), _ x: inout SingleElt)
805797// CHECK: } // end sil function '$s16moveonly_closure38testConsumingEscapeClosureCaptureInOutyyyycn_AA9SingleEltVztFyycfU_'
806798func testConsumingEscapeClosureCaptureInOut( _ f: consuming @escaping ( ) -> ( ) , _ x: inout SingleElt ) {
807799 // expected-note @-1 {{'x' is declared 'inout'}}
808- // expected-error @-2 {{'x' consumed but not reinitialized before end of function}}
809800 f = { // expected-error {{escaping closure captures 'inout' parameter 'x'}}
810- // expected-note @-1 {{consuming use here}}
811801 borrowVal ( x) // expected-note {{captured here}}
812802 consumeVal ( x) // expected-note {{captured here}}
813803 consumeVal ( x) // expected-note {{captured here}}
0 commit comments