Skip to content

Commit

Permalink
Merge pull request #1575 from dtolnay/lexerror
Browse files Browse the repository at this point in the history
Preserve LexError's Display representation in syn::Error
  • Loading branch information
dtolnay authored Jan 3, 2024
2 parents 1650c86 + 7b3286a commit 36e50fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl std::error::Error for Error {}

impl From<LexError> for Error {
fn from(err: LexError) -> Self {
Error::new(err.span(), "lex error")
Error::new(err.span(), err)
}
}

Expand Down

0 comments on commit 36e50fa

Please sign in to comment.