@@ -2731,7 +2731,7 @@ public func enumPatternMatchSwitch2WhereClause2OwnedArg2(_ x2: consuming EnumTy)
27312731/////////////////////////////
27322732
27332733public func closureLetClassUseAfterConsume1( _ x: borrowing Klass ) {
2734- // expected-error @-1 {{'x' is borrowed and cannot be consumed }}
2734+ // expected-error @-1 {{'x' cannot be captured by an escaping closure since it is a borrowed parameter }}
27352735 // expected-error @-2 {{noncopyable 'x' cannot be consumed when captured by a closure}}
27362736 let f = { // expected-note {{closure capturing 'x' here}}
27372737 let x2 = x // expected-error {{'x2' consumed more than once}}
@@ -2830,7 +2830,7 @@ public func closureLetCaptureClassUseAfterConsumeError(_ x: borrowing Klass) { /
28302830
28312831public func closureLetCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
28322832 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
2833- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
2833+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
28342834 let f = { // expected-note {{closure capturing 'x2' here}}
28352835 borrowVal ( x2)
28362836 consumeVal ( x2) // expected-note {{consumed here}}
@@ -2897,7 +2897,7 @@ public func closureLetCaptureClassOwnedArgUseAfterConsume4(_ x2: consuming Klass
28972897/////////////////////////////
28982898
28992899public func closureVarClassUseAfterConsume1( _ x: borrowing Klass ) {
2900- // expected-error @-1 {{'x' is borrowed and cannot be consumed }}
2900+ // expected-error @-1 {{'x' cannot be captured by an escaping closure since it is a borrowed parameter }}
29012901 // expected-error @-2 {{noncopyable 'x' cannot be consumed when captured by a closure}}
29022902 var f = { }
29032903 f = { // expected-note {{closure capturing 'x' here}}
@@ -3007,7 +3007,7 @@ public func closureVarCaptureClassUseAfterConsumeError(_ x: borrowing Klass) { /
30073007
30083008public func closureVarCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
30093009 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3010- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3010+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
30113011 var f = { }
30123012 f = { // expected-note {{closure capturing 'x2' here}}
30133013 borrowVal ( x2)
@@ -3206,7 +3206,7 @@ public func closureLetAndDeferCaptureClassUseAfterConsume3(_ x: borrowing Klass)
32063206
32073207public func closureLetAndDeferCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
32083208 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3209- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3209+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
32103210 let f = { // expected-note {{closure capturing 'x2' here}}
32113211 defer {
32123212 borrowVal ( x2)
@@ -3343,8 +3343,8 @@ public func closureLetAndClosureCaptureClassUseAfterConsume3(_ x: borrowing Klas
33433343
33443344public func closureLetAndClosureCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
33453345 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3346- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3347- // expected-error @-3 {{'x2' is borrowed and cannot be consumed by closure capture }}
3346+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
3347+ // expected-error @-3 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
33483348 let f = { // expected-note {{closure capturing 'x2' here}}
33493349 let g = { // expected-note {{closure capturing 'x2' here}}
33503350 borrowVal ( x2)
@@ -3490,7 +3490,7 @@ public func closureVarAndDeferCaptureClassUseAfterConsume3(_ x: borrowing Klass)
34903490
34913491public func closureVarAndDeferCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
34923492 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3493- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3493+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
34943494 var f = { }
34953495 f = { // expected-note {{closure capturing 'x2' here}}
34963496 defer {
@@ -3630,8 +3630,8 @@ public func closureVarAndClosureCaptureClassUseAfterConsume3(_ x: borrowing Klas
36303630
36313631public func closureVarAndClosureCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
36323632 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3633- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3634- // expected-error @-3 {{'x2' is borrowed and cannot be consumed by closure capture }}
3633+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
3634+ // expected-error @-3 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
36353635 var f = { }
36363636 f = { // expected-note {{closure capturing 'x2' here}}
36373637 var g = { }
@@ -3764,8 +3764,8 @@ public func closureVarAndClosureLetCaptureClassUseAfterConsume3(_ x: borrowing K
37643764
37653765public func closureVarAndClosureLetCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
37663766 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3767- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3768- // expected-error @-3 {{'x2' is borrowed and cannot be consumed by closure capture }}
3767+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
3768+ // expected-error @-3 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
37693769 var f = { }
37703770 f = { // expected-note {{closure capturing 'x2' here}}
37713771let g = { // expected-note {{closure capturing 'x2' here}}
@@ -3893,8 +3893,8 @@ public func closureLetAndClosureVarCaptureClassUseAfterConsume3(_ x: borrowing K
38933893
38943894public func closureLetAndClosureVarCaptureClassArgUseAfterConsume( _ x2: borrowing Klass ) {
38953895 // expected-error @-1 {{noncopyable 'x2' cannot be consumed when captured by a closure}}
3896- // expected-error @-2 {{'x2' is borrowed and cannot be consumed by closure capture }}
3897- // expected-error @-3 {{'x2' is borrowed and cannot be consumed by closure capture }}
3896+ // expected-error @-2 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
3897+ // expected-error @-3 {{'x2' cannot be captured by an escaping closure since it is a borrowed parameter }}
38983898 let f = { // expected-note {{closure capturing 'x2' here}}
38993899 var g = { }
39003900 g = { // expected-note {{closure capturing 'x2' here}}
0 commit comments