Highlight Self as a keyword by default

This commit is contained in:
Lukas Wirth 2022-03-06 00:12:10 +01:00
parent 0bb631bf71
commit e5bb661b7a
5 changed files with 94 additions and 15 deletions

View file

@ -334,6 +334,26 @@ where
);
}
#[test]
fn test_keyword_highlighting() {
check_highlighting(
r#"
extern crate self;
use crate;
use self;
mod __ {
use super::*;
}
struct __ where Self:;
fn __(_: Self) {}
"#,
expect_file!["./test_data/highlight_keywords.html"],
false,
);
}
#[test]
fn test_string_highlighting() {
// The format string detection is based on macro-expansion,