Fix diagnostic style issues (#7982)

Remove trailing `.`s and leading capitalization from diagnostics, and
separate clauses with `;` rather than `.`, per
https://docs.carbon-lang.dev/toolchain/docs/diagnostics.html#diagnostic-message-style-guide
This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-15 20:15:28 +00:00
1 parent 7beb29f8b2
commit d87891f3a6
11 files changed
+39 -39

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ auto HandleBindingPattern(Context& context) -> void {
if (state.in_field_shorthand_pattern) {
CARBON_DIAGNOSTIC(
AnonymousBindingInStructPattern, Error,
"Anonymous binding found in struct pattern. Use `.field = "
"anonymous binding found in struct pattern; use `.field = "
"_: field_type` or `unused field: field_type`");
context.emitter().Emit(*context.position(),
AnonymousBindingInStructPattern);