diff --git a/include/swift/AST/DiagnosticsSIL.def b/include/swift/AST/DiagnosticsSIL.def index 5835a6d5075..88f74ba7bc6 100644 --- a/include/swift/AST/DiagnosticsSIL.def +++ b/include/swift/AST/DiagnosticsSIL.def @@ -221,7 +221,7 @@ ERROR(missing_never_call,none, "call to another never-returning function on all paths", (Type, unsigned)) ERROR(guard_body_must_not_fallthrough,none, - "'guard' body may not fall through, consider using a 'return' or 'throw'" + "'guard' body must not fall through, consider using a 'return' or 'throw'" " to exit the scope", ()) WARNING(unreachable_code,none, "will never be executed", ()) NOTE(unreachable_code_branch,none, diff --git a/test/SILOptimizer/unreachable_code.swift b/test/SILOptimizer/unreachable_code.swift index 608f6803292..91046450548 100644 --- a/test/SILOptimizer/unreachable_code.swift +++ b/test/SILOptimizer/unreachable_code.swift @@ -218,7 +218,7 @@ class r20097963MyClass { func die() -> Never { die() } func testGuard(_ a : Int) { - guard case 4 = a else { } // expected-error {{'guard' body may not fall through, consider using a 'return' or 'throw'}} + guard case 4 = a else { } // expected-error {{'guard' body must not fall through, consider using a 'return' or 'throw'}} guard case 4 = a else { return } // ok guard case 4 = a else { die() } // ok