From ecfc99f33261b9300e900fc2c711deb33bf2eafa Mon Sep 17 00:00:00 2001 From: JHertz5 Date: Wed, 28 Jun 2023 19:59:18 +0100 Subject: [PATCH] Reworked error message to correct typo and grammar mistake. Issue VHDL-LS#178 --- vhdl_lang/src/analysis/literals.rs | 2 +- vhdl_lang/src/analysis/tests/typecheck_expression.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vhdl_lang/src/analysis/literals.rs b/vhdl_lang/src/analysis/literals.rs index 835ed1c9..14cb295f 100644 --- a/vhdl_lang/src/analysis/literals.rs +++ b/vhdl_lang/src/analysis/literals.rs @@ -128,7 +128,7 @@ impl<'a> AnalyzeContext<'a> { diagnostics.error( pos, format!( - "Truncating to {} bit would loose information", + "Truncating vector to length {} would lose information", bit_string.length.unwrap() // Safe as this error can only happen when there is a length ), ); diff --git a/vhdl_lang/src/analysis/tests/typecheck_expression.rs b/vhdl_lang/src/analysis/tests/typecheck_expression.rs index ee6afeb9..5714e485 100644 --- a/vhdl_lang/src/analysis/tests/typecheck_expression.rs +++ b/vhdl_lang/src/analysis/tests/typecheck_expression.rs @@ -196,7 +196,7 @@ constant f: bit_vector := 2SX\"\"; Diagnostic::error(code.s1("D\"1AFFE\""), "Illegal digit 'A' for base 10"), Diagnostic::error( code.s1("8SX\"0FF\""), - "Truncating to 8 bit would loose information", + "Truncating vector to length 8 would lose information", ), Diagnostic::error( code.s1("X\"G\""),