atom-language-rust
atom-language-rust copied to clipboard
Rust's syntax highlighting breaks after `r#impl`
From @rustka in https://github.com/microsoft/vscode/issues/81085
Rust's syntax highlighting breaks after using impl keyword as a raw identifier.
- VSCode version: 1.38.1
- OS version: Linux x64
Steps to reproduce:
- Open the editor;
- Set language mode to Rust;
- Paste the following code:
use r#impl;
fn main() {}
- Comment the first line by prefixing it with
//; 4.1. This failure could also be prevented by replacingr#implwithr#impl {}, but this is not the real solution for that case. - The syntax highlighting works properly back again.
P.S.: I did test it on Atom editor (v1.40.1) and it seemed to work correctly.
Also, after a # the whole line (except some things) is white:
pub fn r#let (&self); // comments
// and // are one of the
#[allow (dead_code)] // exceptions