zargony / atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144
MIT License
116 stars 33 forks source link

Rust's syntax highlighting breaks after `r#impl` #147

Open alexr00 opened 4 years ago

alexr00 commented 4 years ago

From @rustka in https://github.com/microsoft/vscode/issues/81085

Rust's syntax highlighting breaks after using impl keyword as a raw identifier.


Steps to reproduce:

  1. Open the editor;
  2. Set language mode to Rust;
  3. Paste the following code:
use r#impl;
fn main() {}
  1. Comment the first line by prefixing it with //; 4.1. This failure could also be prevented by replacing r#impl with r#impl {}, but this is not the real solution for that case.
  2. 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.

RpxdYTX commented 2 years ago

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