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

Syntax highlighting fail when using bit ops inside type parameters #146

Open
alexr00 opened this issue Jul 29, 2019 · 1 comment
Open

Syntax highlighting fail when using bit ops inside type parameters #146

alexr00 opened this issue Jul 29, 2019 · 1 comment

Comments

@alexr00
Copy link

alexr00 commented Jul 29, 2019

From @ylxdzsw in microsoft/vscode#77380:

(originally reported here)

Currently the grammar does not recognize bit shifting punctuations inside type parameters. Example:

fn main() {
    let a = unsafe { std::mem::uninitialized::<[u8; 1<<14]>() };
    println!("{:?}", a[0])
}

This file is valid and can be compiled and run by rustc. However, vscode does not correctly render the color after <[u8; 1<<14]>. This is what it currently shows:

Screenshot from 2019-07-14 12-42-58

The highlighting works if I remove the bit shift operation:

Screenshot from 2019-07-14 12-44-24

@mayerraphael
Copy link

mayerraphael commented Jun 12, 2020

I have a similiar problem. The highlighting fails at the second chevron:
image

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