atom-language-rust
atom-language-rust copied to clipboard
Syntax highlighting fail when using bit ops inside type parameters
From @ylxdzsw in https://github.com/microsoft/vscode/issues/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:

The highlighting works if I remove the bit shift operation:

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