mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
fix: Fix proc-macro server crashing when parsing a non-lexable string into a TokenStream
This commit is contained in:
parent
6f3356d0dd
commit
d6666b16c4
3 changed files with 15 additions and 3 deletions
|
@ -131,7 +131,7 @@ pub(super) mod token_stream {
|
|||
call_site,
|
||||
src,
|
||||
)
|
||||
.ok_or("lexing error")?;
|
||||
.ok_or_else(|| format!("lexing error: {src}"))?;
|
||||
|
||||
Ok(TokenStream::with_subtree(subtree))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue