Skip to content

Commit f3801c2

Browse files
committed
Fix diagnostic to use proper grammar.
1 parent e3f9eac commit f3801c2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ NOTE(sil_movekillscopyablevalue_use_here, none,
741741
NOTE(sil_movekillscopyablevalue_value_consumed_in_loop, none,
742742
"cyclic move here. move will occur multiple times in the loop", ())
743743
ERROR(sil_movekillscopyablevalue_move_applied_to_unsupported_move, none,
744-
"_move applied to value that the compiler does not supporting checking.",
744+
"_move applied to value that the compiler does not support checking",
745745
())
746746

747747
#define UNDEFINE_DIAGNOSTIC_MACROS

test/SILOptimizer/move_operator_kills_copyable_addresses.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public func conditionalBadConsumingUseLoop2<T>(_ x: T) {
144144

145145
// This is ok, no uses after.
146146
public func simpleMoveOfParameter<T>(_ x: T) -> () {
147-
let _ = _move(x) // expected-error {{_move applied to value that the compiler does not know how to check}}
147+
let _ = _move(x) // expected-error {{_move applied to value that the compiler does not support checking}}
148148
}
149149

150150
public func simpleMoveOfOwnedParameter<T>(_ x: __owned T) -> () {
@@ -269,12 +269,12 @@ public class TPair<T> {
269269
// TODO: Emit a better error here! We should state that we are applying _move to
270270
// a class field and that is illegal.
271271
public func performMoveOnOneEltOfTPair<T>(_ p: TPair<T>) {
272-
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not know how to check. Please file a bug or an enhancement request!}}
272+
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not support checking}}
273273
nonConsumingUse(p.y)
274274
}
275275

276276
public func performMoveOnOneEltOfTPair2<T>(_ p: __owned TPair<T>) {
277-
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not know how to check. Please file a bug or an enhancement request!}}
277+
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not support checking}}
278278
nonConsumingUse(p.y)
279279
}
280280

@@ -284,7 +284,7 @@ public func performMoveOnOneEltOfTPair2<T>(_ p: __owned TPair<T>) {
284284

285285
public func performMoveOnVar<T>(_ p: T) {
286286
var x = p
287-
let _ = _move(x)
287+
let _ = _move(x) // expected-error {{_move applied to value that the compiler does not support checking}}
288288
x = p
289289
nonConsumingUse(x)
290290
}

test/SILOptimizer/move_operator_kills_copyable_values.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,24 +234,24 @@ public class KlassPair {
234234
// TODO: Emit a better error here! We should state that we are applying _move to
235235
// a class field and that is illegal.
236236
public func performMoveOnOneEltOfKlassPair(_ p: KlassPair) {
237-
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not supporting checking.}}
237+
let _ = _move(p.x) // expected-error {{_move applied to value that the compiler does not support checking}}
238238
nonConsumingUse(p.y)
239239
}
240240

241241
let myLetGlobal = Klass()
242242
var myVarGlobal = Klass()
243243

244244
public func performMoveOnVarGlobalError() {
245-
let _ = _move(myVarGlobal) // expected-error {{_move applied to value that the compiler does not supporting checking.}}
245+
let _ = _move(myVarGlobal) // expected-error {{_move applied to value that the compiler does not support checking}}
246246
}
247247

248248
// TODO: Support vars
249249
public func performMoveOnVarError() {
250250
var k = myVarGlobal
251-
let _ = _move(k) // expected-error {{_move applied to value that the compiler does not supporting checking.}}
251+
let _ = _move(k) // expected-error {{_move applied to value that the compiler does not support checking}}
252252
k = myVarGlobal
253253
}
254254

255255
public func performMoveOnLetGlobalError() {
256-
let _ = _move(myVarGlobal) // expected-error {{_move applied to value that the compiler does not supporting checking.}}
256+
let _ = _move(myVarGlobal) // expected-error {{_move applied to value that the compiler does not support checking}}
257257
}

0 commit comments

Comments
 (0)