mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Highlight Self
as a keyword by default
This commit is contained in:
parent
0bb631bf71
commit
e5bb661b7a
5 changed files with 94 additions and 15 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue