Closed
Description
I unfortunately don't have a way to reproduce this, but within the last couple of weeks I have noticed a new issue - sometimes when I make edits and save the file to trigger cargo check
it gives me nonsensical syntax errors. This didn't used to happen. Editing a bit more and saving the file does not help. Reloading the window does.
It feels a lot like Rust-analyzer's internal representation of the code is getting out of sync with VSCode's representation. I have written a couple of language servers and I know the incremental text changing bit is hard to get right - maybe an obscure bug there.
Is there any way to get rust-analyzer to dump what it thinks the current state of a file is?