Skip to content

Commit 1d69fe5

Browse files
committed
[move-only] Change "move only field consumed here" msg -> "consuming use"
In a subsequent commit, I am going to change all of the "consuming use"/"non consuming use" to "consuming use here" and "non consuming use here". But for now, lets standardize.
1 parent 885eb21 commit 1d69fe5

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

test/SILOptimizer/moveonly_objectchecker_diagnostics.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -953,23 +953,23 @@ public func aggStructConsumeField(_ x: AggStruct) { // expected-error {{'x' has
953953
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
954954
classConsume(x2.lhs)
955955
for _ in 0..<1024 {
956-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
956+
classConsume(x2.lhs) // expected-note {{consuming use}}
957957
}
958958
}
959959

960960
public func aggStructConsumeFieldArg(_ x2: AggStruct) {
961961
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
962962
classConsume(x2.lhs)
963963
for _ in 0..<1024 {
964-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
964+
classConsume(x2.lhs) // expected-note {{consuming use}}
965965
}
966966
}
967967

968968
public func aggStructConsumeFieldOwnedArg(_ x2: __owned AggStruct) {
969969
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
970970
classConsume(x2.lhs)
971971
for _ in 0..<1024 {
972-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
972+
classConsume(x2.lhs) // expected-note {{consuming use}}
973973
}
974974
}
975975

@@ -1000,23 +1000,23 @@ public func aggStructConsumeGrandField(_ x: AggStruct) { // expected-error {{'x'
10001000
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
10011001
classConsume(x2.pair.lhs)
10021002
for _ in 0..<1024 {
1003-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1003+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
10041004
}
10051005
}
10061006

10071007
public func aggStructConsumeGrandFieldArg(_ x2: AggStruct) {
10081008
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
10091009
classConsume(x2.pair.lhs)
10101010
for _ in 0..<1024 {
1011-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1011+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
10121012
}
10131013
}
10141014

10151015
public func aggStructConsumeGrandFieldOwnedArg(_ x2: __owned AggStruct) {
10161016
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
10171017
classConsume(x2.pair.lhs)
10181018
for _ in 0..<1024 {
1019-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1019+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
10201020
}
10211021
}
10221022

@@ -1228,23 +1228,23 @@ public func aggGenericStructConsumeField(_ x: AggGenericStruct<Klass>) { // expe
12281228
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12291229
classConsume(x2.lhs)
12301230
for _ in 0..<1024 {
1231-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1231+
classConsume(x2.lhs) // expected-note {{consuming use}}
12321232
}
12331233
}
12341234

12351235
public func aggGenericStructConsumeFieldArg(_ x2: AggGenericStruct<Klass>) {
12361236
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12371237
classConsume(x2.lhs)
12381238
for _ in 0..<1024 {
1239-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1239+
classConsume(x2.lhs) // expected-note {{consuming use}}
12401240
}
12411241
}
12421242

12431243
public func aggGenericStructConsumeFieldOwnedArg(_ x2: __owned AggGenericStruct<Klass>) {
12441244
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12451245
classConsume(x2.lhs)
12461246
for _ in 0..<1024 {
1247-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1247+
classConsume(x2.lhs) // expected-note {{consuming use}}
12481248
}
12491249
}
12501250

@@ -1275,23 +1275,23 @@ public func aggGenericStructConsumeGrandField(_ x: AggGenericStruct<Klass>) { //
12751275
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12761276
classConsume(x2.pair.lhs)
12771277
for _ in 0..<1024 {
1278-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1278+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
12791279
}
12801280
}
12811281

12821282
public func aggGenericStructConsumeGrandFieldArg(_ x2: AggGenericStruct<Klass>) {
12831283
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12841284
classConsume(x2.pair.lhs)
12851285
for _ in 0..<1024 {
1286-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1286+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
12871287
}
12881288
}
12891289

12901290
public func aggGenericStructConsumeGrandFieldOwnedArg(_ x2: __owned AggGenericStruct<Klass>) {
12911291
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
12921292
classConsume(x2.pair.lhs)
12931293
for _ in 0..<1024 {
1294-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1294+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
12951295
}
12961296
}
12971297

@@ -1496,23 +1496,23 @@ public func aggGenericStructConsumeField<T>(_ x: AggGenericStruct<T>) { // expec
14961496
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
14971497
classConsume(x2.lhs)
14981498
for _ in 0..<1024 {
1499-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1499+
classConsume(x2.lhs) // expected-note {{consuming use}}
15001500
}
15011501
}
15021502

15031503
public func aggGenericStructConsumeFieldArg<T>(_ x2: AggGenericStruct<T>) {
15041504
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
15051505
classConsume(x2.lhs)
15061506
for _ in 0..<1024 {
1507-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1507+
classConsume(x2.lhs) // expected-note {{consuming use}}
15081508
}
15091509
}
15101510

15111511
public func aggGenericStructConsumeFieldOwnedArg<T>(_ x2: __owned AggGenericStruct<T>) {
15121512
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
15131513
classConsume(x2.lhs)
15141514
for _ in 0..<1024 {
1515-
classConsume(x2.lhs) // expected-note {{move only field consumed here}}
1515+
classConsume(x2.lhs) // expected-note {{consuming use}}
15161516
}
15171517
}
15181518

@@ -1543,23 +1543,23 @@ public func aggGenericStructConsumeGrandField<T>(_ x: AggGenericStruct<T>) { //
15431543
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
15441544
classConsume(x2.pair.lhs)
15451545
for _ in 0..<1024 {
1546-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1546+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
15471547
}
15481548
}
15491549

15501550
public func aggGenericStructConsumeGrandFieldArg<T>(_ x2: AggGenericStruct<T>) {
15511551
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
15521552
classConsume(x2.pair.lhs)
15531553
for _ in 0..<1024 {
1554-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1554+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
15551555
}
15561556
}
15571557

15581558
public func aggGenericStructConsumeGrandFieldOwnedArg<T>(_ x2: __owned AggGenericStruct<T>) {
15591559
// expected-error @-1 {{'x2' has a move only field that was consumed before later uses}}
15601560
classConsume(x2.pair.lhs)
15611561
for _ in 0..<1024 {
1562-
classConsume(x2.pair.lhs) // expected-note {{move only field consumed here}}
1562+
classConsume(x2.pair.lhs) // expected-note {{consuming use}}
15631563
}
15641564
}
15651565

0 commit comments

Comments
 (0)