From 7b3286afc69a88f52f5101fa5b920094c7fd1fd9 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 3 Jan 2024 14:51:40 -0800 Subject: [PATCH] Preserve LexError's Display representation in syn::Error --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index d59e08fd0..71247cde3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -404,7 +404,7 @@ impl std::error::Error for Error {} impl From for Error { fn from(err: LexError) -> Self { - Error::new(err.span(), "lex error") + Error::new(err.span(), err) } }