Skip to content

Commit

Permalink
small error msg tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Hansen committed Feb 26, 2021
1 parent fc38750 commit 3b028e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser/src/semantics/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum CompileError<'sc> {
Unimplemented(&'static str, Span<'sc>),
#[error("Internal compiler error: {0}\nPlease file an issue on the repository and include the code that triggered this error.")]
Internal(&'static str, Span<'sc>),
#[error("Type error: {0}")]
#[error("{0}")]
TypeError(TypeError<'sc>),
#[error("Parse error: {0}")]
ParseError(ParseError<'sc>),
Expand All @@ -43,7 +43,7 @@ impl<'sc> std::convert::From<TypeError<'sc>> for CompileError<'sc> {

#[derive(Error, Debug)]
pub enum TypeError<'sc> {
#[error("Mismatched types: Expected type {expected} but received type {received}. Type {received} is not castable to type {expected}. {help_text}")]
#[error("Mismatched types: Expected type {expected} but found type {received}. Type {received} is not castable to type {expected}.\n help: {help_text}")]
MismatchedType {
expected: String,
received: String,
Expand Down

0 comments on commit 3b028e6

Please sign in to comment.