Fix typo and pluralize message for invalid field arity error.

This commit is contained in:
KtorZ 2023-03-08 11:44:54 +01:00
parent 2aa8a7f973
commit 0ea4538cac
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 2 additions and 1 deletions

View File

@ -264,8 +264,9 @@ You can use '{discard}' and numbers to distinguish between similar names.
},
#[error(
"I saw a {} fields in a context where there should be {}.\n",
"I saw {} field{} in a context where there should be {}.\n",
given.if_supports_color(Stdout, |s| s.purple()),
if *given <= 1 { "" } else { "s"},
expected.if_supports_color(Stdout, |s| s.purple()),
)]
#[diagnostic(url("https://aiken-lang.org/language-tour/custom-types"))]