Skip to content

Commit c8c1f17

Browse files
committed
Update lifetime dependence diagnostic message
1 parent 9c57458 commit c8c1f17

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7894,7 +7894,7 @@ ERROR(lifetime_dependence_invalid_return_type, none,
78947894
ERROR(lifetime_dependence_cannot_infer_ambiguous_candidate, none,
78957895
"cannot infer lifetime dependence %0, multiple parameters qualifiy as a candidate", (StringRef))
78967896
ERROR(lifetime_dependence_cannot_infer_no_candidates, none,
7897-
"cannot infer lifetime dependence %0, no parameters found that are "
7897+
"cannot infer lifetime dependence %0, no parameters found that are either "
78987898
"~Escapable or Escapable with a borrowing ownership", (StringRef))
78997899
ERROR(lifetime_dependence_ctor_non_self_or_nil_return, none,
79007900
"expected nil or self as return values in an initializer with "

test/Sema/implicit_lifetime_dependence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct BufferView : ~Escapable, ~Copyable {
1111
}
1212
}
1313

14-
struct ImplicitInit1 : ~Escapable { // expected-error{{cannot infer lifetime dependence on implicit initializer, no parameters found that are ~Escapable or Escapable with a borrowing ownership}}
14+
struct ImplicitInit1 : ~Escapable { // expected-error{{cannot infer lifetime dependence on implicit initializer, no parameters found that are either ~Escapable or Escapable with a borrowing ownership}}
1515
let ptr: UnsafeRawBufferPointer
1616
}
1717

@@ -24,7 +24,7 @@ struct ImplicitInit3 : ~Escapable, ~Copyable { // expected-error{{cannot infer l
2424
let mbv2: BufferView
2525
}
2626

27-
func foo() -> BufferView { // expected-error{{cannot infer lifetime dependence , no parameters found that are ~Escapable or Escapable with a borrowing ownership}}
27+
func foo() -> BufferView { // expected-error{{cannot infer lifetime dependence , no parameters found that are either ~Escapable or Escapable with a borrowing ownership}}
2828
return BufferView(nil, 0)
2929
}
3030

0 commit comments

Comments
 (0)