You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/SILOptimizer/moveonly_addresschecker_diagnostics.swift
+12-31Lines changed: 12 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -2278,13 +2278,10 @@ public func addressOnlyGenericAssignToVar5Arg2<T>(_ x: borrowing AddressOnlyGene
2278
2278
// remove them when I fix it in the next commit.
2279
2279
publicfunc addressOnlyGenericAccessAccessField<T>(_ x:borrowingAddressOnlyGeneric<T>){ // expected-error {{'x' has guaranteed ownership but was consumed}}
2280
2280
varx2= x // expected-note {{consuming use here}}
2281
-
// expected-error @-1 {{'x2' consumed by a use in a loop}}
2282
-
// expected-error @-2 {{'x2' consumed more than once}}
2283
2281
x2 =AddressOnlyGeneric<T>()
2284
-
borrowVal(x2.copyable) // expected-note {{consuming use here}}
2282
+
borrowVal(x2.copyable)
2285
2283
for_in0..<1024{
2286
-
borrowVal(x2.copyable) // expected-note {{consuming use here}}
2287
-
// expected-note @-1 {{consuming use here}}
2284
+
borrowVal(x2.copyable)
2288
2285
}
2289
2286
}
2290
2287
@@ -2298,11 +2295,9 @@ public func addressOnlyGenericAccessAccessField2<T>(_ x: borrowing AddressOnlyGe
// expected-error @-1 {{'x2' consumed by a use in a loop}}
2318
-
// expected-error @-2 {{'x2' consumed more than once}}
2319
-
borrowVal(x2.copyable) // expected-note {{consuming use here}}
2312
+
borrowVal(x2.copyable)
2320
2313
for_in0..<1024{
2321
-
borrowVal(x2.copyable) // expected-note {{consuming use here}}
2322
-
// expected-note @-1 {{consuming use here}}
2314
+
borrowVal(x2.copyable)
2323
2315
}
2324
2316
}
2325
2317
@@ -2332,14 +2324,11 @@ public func addressOnlyGenericAccessAccessFieldArg4<T>(_ x2: consuming AddressOn
2332
2324
2333
2325
publicfunc addressOnlyGenericAccessConsumeField<T>(_ x:borrowingAddressOnlyGeneric<T>){ // expected-error {{'x' has guaranteed ownership but was consumed}}
2334
2326
varx2= x // expected-note {{consuming use here}}
2335
-
// expected-error @-1 {{'x2' consumed by a use in a loop}}
2336
-
// expected-error @-2 {{'x2' consumed more than once}}
2337
2327
x2 =AddressOnlyGeneric<T>()
2338
2328
2339
-
consumeVal(x2.copyable) // expected-note {{consuming use here}}
2329
+
consumeVal(x2.copyable)
2340
2330
for_in0..<1024{
2341
-
consumeVal(x2.copyable) // expected-note {{consuming use here}}
2342
-
// expected-note @-1 {{consuming use here}}
2331
+
consumeVal(x2.copyable)
2343
2332
}
2344
2333
}
2345
2334
@@ -2357,13 +2346,9 @@ public func addressOnlyGenericAccessConsumeField2<T>(_ x: borrowing AddressOnlyG
0 commit comments