aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-26 22:09:55 +0000
committerAleksey Kladov <[email protected]>2020-02-27 08:32:00 +0000
commit995c46024b6d3a10ee781a09ed16ef1f6de95e58 (patch)
tree933964efe1ae70b3c0d8f84746d65442a12d07b9 /crates/ra_ide
parentf7db49bfc6dd77471865c8591fdf7d5d00992830 (diff)
Fix html tests
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html52
-rw-r--r--crates/ra_ide/src/snapshots/rainbow_highlighting.html14
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs12
3 files changed, 39 insertions, 39 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html
index a02dbaf2f..51851763e 100644
--- a/crates/ra_ide/src/snapshots/highlighting.html
+++ b/crates/ra_ide/src/snapshots/highlighting.html
@@ -10,29 +10,29 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
10.parameter { color: #94BFF3; } 10.parameter { color: #94BFF3; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.type { color: #7CB8BB; } 12.type { color: #7CB8BB; }
13.type\.builtin { color: #8CD0D3; } 13.type.builtin { color: #8CD0D3; }
14.type\.param { color: #20999D; } 14.type.param { color: #20999D; }
15.attribute { color: #94BFF3; } 15.attribute { color: #94BFF3; }
16.literal { color: #BFEBBF; } 16.literal { color: #BFEBBF; }
17.literal\.numeric { color: #6A8759; } 17.literal.numeric { color: #6A8759; }
18.macro { color: #94BFF3; } 18.macro { color: #94BFF3; }
19.module { color: #AFD8AF; } 19.module { color: #AFD8AF; }
20.variable { color: #DCDCCC; } 20.variable { color: #DCDCCC; }
21.variable\.mut { color: #DCDCCC; text-decoration: underline; } 21.variable.mut { color: #DCDCCC; text-decoration: underline; }
22 22
23.keyword { color: #F0DFAF; } 23.keyword { color: #F0DFAF; }
24.keyword\.unsafe { color: #DFAF8F; } 24.keyword.unsafe { color: #DFAF8F; }
25.keyword\.control { color: #F0DFAF; font-weight: bold; } 25.keyword.control { color: #F0DFAF; font-weight: bold; }
26</style> 26</style>
27<pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> 27<pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span>
28<span class="keyword">struct</span> <span class="type">Foo</span> { 28<span class="keyword">struct</span> <span class="type">Foo</span> {
29 <span class="keyword">pub</span> <span class="field">x</span>: <span class="type.builtin">i32</span>, 29 <span class="keyword">pub</span> <span class="field">x</span>: <span class="type builtin">i32</span>,
30 <span class="keyword">pub</span> <span class="field">y</span>: <span class="type.builtin">i32</span>, 30 <span class="keyword">pub</span> <span class="field">y</span>: <span class="type builtin">i32</span>,
31} 31}
32 32
33<span class="keyword">fn</span> <span class="function">foo</span>&lt;<span class="type.param">T</span>&gt;() -&gt; <span class="type.param">T</span> { 33<span class="keyword">fn</span> <span class="function">foo</span>&lt;<span class="type param">T</span>&gt;() -&gt; <span class="type param">T</span> {
34 <span class="macro">unimplemented</span><span class="macro">!</span>(); 34 <span class="macro">unimplemented</span><span class="macro">!</span>();
35 <span class="function">foo</span>::&lt;<span class="type.builtin">i32</span>&gt;(); 35 <span class="function">foo</span>::&lt;<span class="type builtin">i32</span>&gt;();
36} 36}
37 37
38<span class="macro">macro_rules</span><span class="macro">!</span> def_fn { 38<span class="macro">macro_rules</span><span class="macro">!</span> def_fn {
@@ -40,33 +40,33 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
40} 40}
41 41
42<span class="macro">def_fn</span><span class="macro">!</span>{ 42<span class="macro">def_fn</span><span class="macro">!</span>{
43 <span class="keyword">fn</span> <span class="function">bar</span>() -&gt; <span class="type.builtin">u32</span> { 43 <span class="keyword">fn</span> <span class="function">bar</span>() -&gt; <span class="type builtin">u32</span> {
44 <span class="literal.numeric">100</span> 44 <span class="literal numeric">100</span>
45 } 45 }
46} 46}
47 47
48<span class="comment">// comment</span> 48<span class="comment">// comment</span>
49<span class="keyword">fn</span> <span class="function">main</span>() { 49<span class="keyword">fn</span> <span class="function">main</span>() {
50 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal.numeric">92</span>); 50 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal numeric">92</span>);
51 51
52 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">vec</span> = Vec::new(); 52 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">vec</span> = Vec::new();
53 <span class="keyword.control">if</span> <span class="keyword">true</span> { 53 <span class="keyword control">if</span> <span class="keyword">true</span> {
54 <span class="keyword">let</span> <span class="variable">x</span> = <span class="literal.numeric">92</span>; 54 <span class="keyword">let</span> <span class="variable">x</span> = <span class="literal numeric">92</span>;
55 <span class="variable.mut">vec</span>.push(<span class="type">Foo</span> { <span class="field">x</span>, <span class="field">y</span>: <span class="literal.numeric">1</span> }); 55 <span class="variable mutable">vec</span>.push(<span class="type">Foo</span> { <span class="field">x</span>, <span class="field">y</span>: <span class="literal numeric">1</span> });
56 } 56 }
57 <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.set_len(<span class="literal.numeric">0</span>); } 57 <span class="keyword unsafe">unsafe</span> { <span class="variable mutable">vec</span>.set_len(<span class="literal numeric">0</span>); }
58 58
59 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">x</span> = <span class="literal.numeric">42</span>; 59 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable">x</span> = <span class="literal numeric">42</span>;
60 <span class="keyword">let</span> <span class="variable.mut">y</span> = &<span class="keyword">mut</span> <span class="variable.mut">x</span>; 60 <span class="keyword">let</span> <span class="variable mutable">y</span> = &<span class="keyword">mut</span> <span class="variable mutable">x</span>;
61 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>; 61 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable mutable">y</span>;
62 62
63 <span class="variable.mut">y</span>; 63 <span class="variable mutable">y</span>;
64} 64}
65 65
66<span class="keyword">enum</span> <span class="type">E</span>&lt;<span class="type.param">X</span>&gt; { 66<span class="keyword">enum</span> <span class="type">E</span>&lt;<span class="type param">X</span>&gt; {
67 <span class="constant">V</span>(<span class="type.param">X</span>) 67 <span class="constant">V</span>(<span class="type param">X</span>)
68} 68}
69 69
70<span class="keyword">impl</span>&lt;<span class="type.param">X</span>&gt; <span class="type">E</span>&lt;<span class="type.param">X</span>&gt; { 70<span class="keyword">impl</span>&lt;<span class="type param">X</span>&gt; <span class="type">E</span>&lt;<span class="type param">X</span>&gt; {
71 <span class="keyword">fn</span> <span class="function">new</span>&lt;<span class="type.param">T</span>&gt;() -&gt; <span class="type">E</span>&lt;<span class="type.param">T</span>&gt; {} 71 <span class="keyword">fn</span> <span class="function">new</span>&lt;<span class="type param">T</span>&gt;() -&gt; <span class="type">E</span>&lt;<span class="type param">T</span>&gt; {}
72}</code></pre> \ No newline at end of file 72}</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide/src/snapshots/rainbow_highlighting.html b/crates/ra_ide/src/snapshots/rainbow_highlighting.html
index d6a7da953..1f869867f 100644
--- a/crates/ra_ide/src/snapshots/rainbow_highlighting.html
+++ b/crates/ra_ide/src/snapshots/rainbow_highlighting.html
@@ -10,19 +10,19 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
10.parameter { color: #94BFF3; } 10.parameter { color: #94BFF3; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.type { color: #7CB8BB; } 12.type { color: #7CB8BB; }
13.type\.builtin { color: #8CD0D3; } 13.type.builtin { color: #8CD0D3; }
14.type\.param { color: #20999D; } 14.type.param { color: #20999D; }
15.attribute { color: #94BFF3; } 15.attribute { color: #94BFF3; }
16.literal { color: #BFEBBF; } 16.literal { color: #BFEBBF; }
17.literal\.numeric { color: #6A8759; } 17.literal.numeric { color: #6A8759; }
18.macro { color: #94BFF3; } 18.macro { color: #94BFF3; }
19.module { color: #AFD8AF; } 19.module { color: #AFD8AF; }
20.variable { color: #DCDCCC; } 20.variable { color: #DCDCCC; }
21.variable\.mut { color: #DCDCCC; text-decoration: underline; } 21.variable.mut { color: #DCDCCC; text-decoration: underline; }
22 22
23.keyword { color: #F0DFAF; } 23.keyword { color: #F0DFAF; }
24.keyword\.unsafe { color: #DFAF8F; } 24.keyword.unsafe { color: #DFAF8F; }
25.keyword\.control { color: #F0DFAF; font-weight: bold; } 25.keyword.control { color: #F0DFAF; font-weight: bold; }
26</style> 26</style>
27<pre><code><span class="keyword">fn</span> <span class="function">main</span>() { 27<pre><code><span class="keyword">fn</span> <span class="function">main</span>() {
28 <span class="keyword">let</span> <span class="variable" data-binding-hash="8121853618659664005" style="color: hsl(261,57%,61%);">hello</span> = <span class="string">"hello"</span>; 28 <span class="keyword">let</span> <span class="variable" data-binding-hash="8121853618659664005" style="color: hsl(261,57%,61%);">hello</span> = <span class="string">"hello"</span>;
@@ -34,5 +34,5 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
34} 34}
35 35
36<span class="keyword">fn</span> <span class="function">bar</span>() { 36<span class="keyword">fn</span> <span class="function">bar</span>() {
37 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut" data-binding-hash="8121853618659664005" style="color: hsl(261,57%,61%);">hello</span> = <span class="string">"hello"</span>; 37 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable mutable" data-binding-hash="8121853618659664005" style="color: hsl(261,57%,61%);">hello</span> = <span class="string">"hello"</span>;
38}</code></pre> \ No newline at end of file 38}</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 18980dc20..c0f13f171 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -365,19 +365,19 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
365.parameter { color: #94BFF3; } 365.parameter { color: #94BFF3; }
366.text { color: #DCDCCC; } 366.text { color: #DCDCCC; }
367.type { color: #7CB8BB; } 367.type { color: #7CB8BB; }
368.type\\.builtin { color: #8CD0D3; } 368.type.builtin { color: #8CD0D3; }
369.type\\.param { color: #20999D; } 369.type.param { color: #20999D; }
370.attribute { color: #94BFF3; } 370.attribute { color: #94BFF3; }
371.literal { color: #BFEBBF; } 371.literal { color: #BFEBBF; }
372.literal\\.numeric { color: #6A8759; } 372.literal.numeric { color: #6A8759; }
373.macro { color: #94BFF3; } 373.macro { color: #94BFF3; }
374.module { color: #AFD8AF; } 374.module { color: #AFD8AF; }
375.variable { color: #DCDCCC; } 375.variable { color: #DCDCCC; }
376.variable\\.mut { color: #DCDCCC; text-decoration: underline; } 376.variable.mut { color: #DCDCCC; text-decoration: underline; }
377 377
378.keyword { color: #F0DFAF; } 378.keyword { color: #F0DFAF; }
379.keyword\\.unsafe { color: #DFAF8F; } 379.keyword.unsafe { color: #DFAF8F; }
380.keyword\\.control { color: #F0DFAF; font-weight: bold; } 380.keyword.control { color: #F0DFAF; font-weight: bold; }
381</style> 381</style>
382"; 382";
383 383