diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-11 19:25:26 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-11 19:25:26 +0000 |
commit | db6d214411505de6534fce183e9bea8109bc5283 (patch) | |
tree | ca0c8d13f9723a4d54feec9e3359c2e5461712b3 /crates/ra_ide_api/src | |
parent | a78142cc648cd0c95dcaabc598d614f0edc24eb6 (diff) | |
parent | 0d060b073ce965511e3c794c4b6e70f69d14d2ff (diff) |
Merge #793
793: remove hard-coded query-group macro r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap | 28 | ||||
-rw-r--r-- | crates/ra_ide_api/src/syntax_highlighting.rs | 15 |
2 files changed, 0 insertions, 43 deletions
diff --git a/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap b/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap deleted file mode 100644 index 0b802ac3d..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-02-01T07:52:15.689836752+00:00" | ||
3 | creator: [email protected] | ||
4 | expression: "&highlights" | ||
5 | source: crates/ra_ide_api/src/syntax_highlighting.rs | ||
6 | --- | ||
7 | [ | ||
8 | HighlightedRange { | ||
9 | range: [20; 32), | ||
10 | tag: "macro" | ||
11 | }, | ||
12 | HighlightedRange { | ||
13 | range: [13; 18), | ||
14 | tag: "text" | ||
15 | }, | ||
16 | HighlightedRange { | ||
17 | range: [51; 54), | ||
18 | tag: "keyword" | ||
19 | }, | ||
20 | HighlightedRange { | ||
21 | range: [55; 60), | ||
22 | tag: "keyword" | ||
23 | }, | ||
24 | HighlightedRange { | ||
25 | range: [61; 72), | ||
26 | tag: "function" | ||
27 | } | ||
28 | ] | ||
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index a435fe56e..345b6653d 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs | |||
@@ -41,19 +41,4 @@ mod tests { | |||
41 | let highlights = analysis.highlight(file_id).unwrap(); | 41 | let highlights = analysis.highlight(file_id).unwrap(); |
42 | assert_debug_snapshot_matches!("highlights_code_inside_macros", &highlights); | 42 | assert_debug_snapshot_matches!("highlights_code_inside_macros", &highlights); |
43 | } | 43 | } |
44 | |||
45 | // FIXME: this test is not really necessary: artifact of the inital hacky | ||
46 | // macros implementation. | ||
47 | #[test] | ||
48 | fn highlight_query_group_macro() { | ||
49 | let (analysis, file_id) = single_file( | ||
50 | " | ||
51 | salsa::query_group! { | ||
52 | pub trait HirDatabase: SyntaxDatabase {} | ||
53 | } | ||
54 | ", | ||
55 | ); | ||
56 | let highlights = analysis.highlight(file_id).unwrap(); | ||
57 | assert_debug_snapshot_matches!("highlight_query_group_macro", &highlights); | ||
58 | } | ||
59 | } | 44 | } |