Skip to content

Commit

Permalink
Change newlines in messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere committed Dec 13, 2023
1 parent dba4bd9 commit f47bfc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/diagnostics/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ implement_diagnostic_functions!(
(
"E018",
CompactTypeCannotContainTaggedFields,
format!("tagged fields are not supported in compact {kind}s\nconsider removing the tag, or making the {kind} non-compact"),
format!("tagged fields are not supported in compact {kind}s; consider removing the tag, or making the {kind} non-compact"),
kind
),
(
Expand Down Expand Up @@ -528,7 +528,7 @@ implement_diagnostic_functions!(
(
"E047",
InfiniteSizeCycle,
format!("self-referential type {type_id} has infinite size.\n{cycle}"),
format!("self-referential type {type_id} has infinite size: {cycle}"),
type_id, cycle
),
(
Expand Down
2 changes: 1 addition & 1 deletion src/validators/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn check_compact_modifier(enum_def: &Enum, diagnostics: &mut Diagnostics) {
})
.set_span(enum_def.span())
.add_note(
"compact enums cannot also have underlying types\ntry removing either the 'compact' modifier, or the underlying type",
"compact enums cannot also have underlying types; try removing either the 'compact' modifier, or the underlying type",
Some(underlying.span()),
)
.push_into(diagnostics);
Expand Down
2 changes: 1 addition & 1 deletion tests/enums/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn compact_enums_cannot_have_underlying_types() {
})
.set_span(&Span::new((4, 9).into(), (4, 23).into(), "string-0"))
.add_note(
"compact enums cannot also have underlying types\ntry removing either the 'compact' modifier, or the underlying type",
"compact enums cannot also have underlying types; try removing either the 'compact' modifier, or the underlying type",
Some(&Span::new((4, 25).into(), (4, 30).into(), "string-0")),
);
check_diagnostics(diagnostics, [expected]);
Expand Down

0 comments on commit f47bfc9

Please sign in to comment.