Skip to content

Commit 2f8a0dd

Browse files
committed
Fix a static exclusive diagnostic
1 parent eca56da commit 2f8a0dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ NOTE(attr_static_exclusive_only_type_nonmutating,none,
19291929
ERROR(attr_static_exclusive_only_let_only_param,none,
19301930
"parameter of type %0 must be declared as either 'borrowing' or 'consuming'", (Type))
19311931
ERROR(attr_static_exclusive_only_mutating,none,
1932-
"@_staticExclusiveOnly type %0 cannot have mutating function %1", (Type, ValueDecl *))
1932+
"type %0 cannot have mutating function %1", (Type, ValueDecl *))
19331933

19341934
ERROR(c_func_variadic, none,
19351935
"cannot declare variadic argument %0 in %kind1",

test/attr/attr_static_exclusive_only.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct B: ~Copyable { // expected-note {{'B' is a non-mutable type}}
99
// expected-note@-2 {{'B' is a non-mutable type}}
1010
// expected-note@-3 {{'B' is a non-mutable type}}
1111
// expected-note@-4 {{'B' is a non-mutable type}}
12-
mutating func change() { // expected-error {{@_staticExclusiveOnly type 'B' cannot have mutating function 'change()'}}
12+
mutating func change() { // expected-error {{type 'B' cannot have mutating function 'change()'}}
1313
print("123")
1414
}
1515
}

0 commit comments

Comments
 (0)