mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 05:58:10 +00:00
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:
1 parent
7beb29f8b2
commit
d87891f3a6
11 files changed
+39
-39
No files matched your search
@@ -268,7 +268,7 @@ static auto HandlePatternList(Context& context, NodeKind node_kind,
|
||||
if (state.in_field_shorthand_pattern) {
|
||||
if (node_kind == NodeKind::TuplePatternStart) {
|
||||
CARBON_DIAGNOSTIC(NestedTuplePatternInStructPatternShortField, Error,
|
||||
"Tuple pattern in shorthand struct pattern field. Use "
|
||||
"tuple pattern in shorthand struct pattern field; use "
|
||||
"`.field = (...)` instead");
|
||||
context.emitter().Emit(*context.position(),
|
||||
NestedTuplePatternInStructPatternShortField);
|
||||
@@ -276,7 +276,7 @@ static auto HandlePatternList(Context& context, NodeKind node_kind,
|
||||
context.ReturnErrorOnState();
|
||||
} else if (node_kind == NodeKind::StructPatternStart) {
|
||||
CARBON_DIAGNOSTIC(NestedStructPatternStructPatternShortField, Error,
|
||||
"Struct pattern in shorthand struct pattern field. Use "
|
||||
"struct pattern in shorthand struct pattern field; use "
|
||||
"`.field = {{...}` instead");
|
||||
context.emitter().Emit(*context.position(),
|
||||
NestedStructPatternStructPatternShortField);
|
||||
|
||||
Reference in new issue
Block a user