Sublime Forum

Rust syntax highlighting bug: <[T]>

#1

ST3 (stable channel, build 3114) syntax highlighting for Rust language incorrectly indicates an error (the red rectangle) for the first square bracket in <[T]> like so:

0 Likes

#2

possibly fixed with https://github.com/sublimehq/Packages/issues/499, check dev build 3120

0 Likes

#3

Running ST3 (dev channel, build 3125) now, and the exact same issue still exists. Here’s a copy-pasteable version:

struct Thingy<T> {
    stuff: [T; 10]
}

impl<T> AsRef<[T]> for Thingy<T> {
    fn as_ref(&self) -> &[T] {
        &self.stuff[..]
    }
}
0 Likes

#4

Open a new issue on:

  1. https://github.com/sublimehq/Packages/issues

If it is not opened yet.

0 Likes