Rust Analyzer highlights wrong lines

43 points Black616Angel

ETA:

WORKAROUND:
(thx to /u/VincentFoulon80)

Change line endings to LF!

​

Hello guys,I am currently having a weird problem in rust-analyzer.The highlights are not in the correct space and rust-analyzer even changes the line/column of the error in the problem list.

​

​

Example:Code is in picture.

I purposefully deleted the ending of "Error" to show the error.Rust-analyzer now tells me that the error is in line 13, column 4.But cargo check says (correctly) that its line 12 column 28.

I already disabled the rust analyzer and all highlights stopped so it has to be the rust-analyzer.

​

I have searched the issues but have not found any corresponding to this.

Is there already an issue or should I create one?

https://preview.redd.it/nmmd1uchjk191.png?width=299&format=png&auto=webp&s=88742833ec2c9fdd0e9a257acf0dccec6331f856