mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
67c45b739a
This commit adds a heuristics-based syntax highlighter for the `rustc --explain` command. It uses `rsutc_lexer`'s lexer to parse input in tokens, and matches on them to determine their color.
637 B
637 B
struct Foo;
fn baz(x: i32) {
// A function
}
fn main() {
let foo = Foo;
foo.bar();
}