Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

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

Open
alexr00 opened this issue Sep 19, 2019 · 1 comment
Open

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

alexr00 opened this issue Sep 19, 2019 · 1 comment

Comments

@alexr00
Copy link

alexr00 commented Sep 19, 2019

From @rustka in microsoft/vscode#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:

  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
Copy link

RpxdYTX commented Nov 1, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants