Give LexError more descriptive Display impl

This commit is contained in:
Kinsey Favre 2020-02-08 10:51:54 -06:00
parent f2b22a136c
commit 5099ab6e6b
No known key found for this signature in database
GPG Key ID: F42A38FAF496F4BE

View File

@ -69,7 +69,7 @@ pub struct LexError {
#[stable(feature = "proc_macro_lexerror_impls", since = "1.44.0")]
impl fmt::Display for LexError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("lex error")
f.write_str("cannot parse string into token stream")
}
}