diff options
author | Aleksey Kladov <[email protected]> | 2019-12-20 13:10:31 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-20 13:12:14 +0000 |
commit | d057afb945b34cbefc1f0722f4dd0ff2758b760b (patch) | |
tree | a846479c2a8d5cbb0af8ed076f5b0e2aba09b5d0 | |
parent | a2ce8ab27526f544aca4acd019394d57aa735812 (diff) |
Improve highlighting test
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 4 | ||||
-rw-r--r-- | crates/ra_ide/src/snapshots/rainbow_highlighting.html | 1 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html index 2157139f6..748fd9558 100644 --- a/crates/ra_ide/src/snapshots/highlighting.html +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -5,6 +5,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
5 | 5 | ||
6 | .comment { color: #7F9F7F; } | 6 | .comment { color: #7F9F7F; } |
7 | .string { color: #CC9393; } | 7 | .string { color: #CC9393; } |
8 | .field { color: #94BFF3; } | ||
8 | .function { color: #93E0E3; } | 9 | .function { color: #93E0E3; } |
9 | .parameter { color: #94BFF3; } | 10 | .parameter { color: #94BFF3; } |
10 | .text { color: #DCDCCC; } | 11 | .text { color: #DCDCCC; } |
@@ -39,7 +40,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
39 | 40 | ||
40 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">vec</span> = <span class="text">Vec</span>::<span class="text">new</span>(); | 41 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">vec</span> = <span class="text">Vec</span>::<span class="text">new</span>(); |
41 | <span class="keyword.control">if</span> <span class="keyword">true</span> { | 42 | <span class="keyword.control">if</span> <span class="keyword">true</span> { |
42 | <span class="variable.mut">vec</span>.<span class="text">push</span>(<span class="type">Foo</span> { <span class="field">x</span>: <span class="literal.numeric">0</span>, <span class="field">y</span>: <span class="literal.numeric">1</span> }); | 43 | <span class="keyword">let</span> <span class="variable">x</span> = <span class="literal.numeric">92</span>; |
44 | <span class="variable.mut">vec</span>.<span class="text">push</span>(<span class="type">Foo</span> { <span class="text">x</span>, <span class="field">y</span>: <span class="literal.numeric">1</span> }); | ||
43 | } | 45 | } |
44 | <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal.numeric">0</span>); } | 46 | <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal.numeric">0</span>); } |
45 | 47 | ||
diff --git a/crates/ra_ide/src/snapshots/rainbow_highlighting.html b/crates/ra_ide/src/snapshots/rainbow_highlighting.html index 871a52cf6..110556c09 100644 --- a/crates/ra_ide/src/snapshots/rainbow_highlighting.html +++ b/crates/ra_ide/src/snapshots/rainbow_highlighting.html | |||
@@ -5,6 +5,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
5 | 5 | ||
6 | .comment { color: #7F9F7F; } | 6 | .comment { color: #7F9F7F; } |
7 | .string { color: #CC9393; } | 7 | .string { color: #CC9393; } |
8 | .field { color: #94BFF3; } | ||
8 | .function { color: #93E0E3; } | 9 | .function { color: #93E0E3; } |
9 | .parameter { color: #94BFF3; } | 10 | .parameter { color: #94BFF3; } |
10 | .text { color: #DCDCCC; } | 11 | .text { color: #DCDCCC; } |
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 15e75709c..63f5d3cb0 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -282,6 +282,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
282 | 282 | ||
283 | .comment { color: #7F9F7F; } | 283 | .comment { color: #7F9F7F; } |
284 | .string { color: #CC9393; } | 284 | .string { color: #CC9393; } |
285 | .field { color: #94BFF3; } | ||
285 | .function { color: #93E0E3; } | 286 | .function { color: #93E0E3; } |
286 | .parameter { color: #94BFF3; } | 287 | .parameter { color: #94BFF3; } |
287 | .text { color: #DCDCCC; } | 288 | .text { color: #DCDCCC; } |
@@ -327,7 +328,8 @@ fn main() { | |||
327 | 328 | ||
328 | let mut vec = Vec::new(); | 329 | let mut vec = Vec::new(); |
329 | if true { | 330 | if true { |
330 | vec.push(Foo { x: 0, y: 1 }); | 331 | let x = 92; |
332 | vec.push(Foo { x, y: 1 }); | ||
331 | } | 333 | } |
332 | unsafe { vec.set_len(0); } | 334 | unsafe { vec.set_len(0); } |
333 | 335 | ||