aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/snapshots/highlighting.html
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlighting.html')
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html26
1 files changed, 14 insertions, 12 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html
index 4166a8f90..40605d9ef 100644
--- a/crates/ra_ide/src/snapshots/highlighting.html
+++ b/crates/ra_ide/src/snapshots/highlighting.html
@@ -10,8 +10,10 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
10.builtin { color: #DD6718; } 10.builtin { color: #DD6718; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.type { color: #7CB8BB; } 12.type { color: #7CB8BB; }
13.type\.param { color: #20999D; }
13.attribute { color: #94BFF3; } 14.attribute { color: #94BFF3; }
14.literal { color: #BFEBBF; } 15.literal { color: #BFEBBF; }
16.literal\.numeric { color: #6A8759; }
15.macro { color: #94BFF3; } 17.macro { color: #94BFF3; }
16.variable { color: #DCDCCC; } 18.variable { color: #DCDCCC; }
17.variable\.mut { color: #DCDCCC; text-decoration: underline; } 19.variable\.mut { color: #DCDCCC; text-decoration: underline; }
@@ -22,36 +24,36 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
22</style> 24</style>
23<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> 25<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>
24<span class="keyword">struct</span> <span class="type">Foo</span> { 26<span class="keyword">struct</span> <span class="type">Foo</span> {
25 <span class="keyword">pub</span> <span class="field">x</span>: <span class="type">i32</span>, 27 <span class="keyword">pub</span> <span class="field">x</span>: <span class="type.builtin">i32</span>,
26 <span class="keyword">pub</span> <span class="field">y</span>: <span class="type">i32</span>, 28 <span class="keyword">pub</span> <span class="field">y</span>: <span class="type.builtin">i32</span>,
27} 29}
28 30
29<span class="keyword">fn</span> <span class="function">foo</span>&lt;<span class="type">T</span>&gt;() -&gt; <span class="type">T</span> { 31<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> {
30 <span class="macro">unimplemented</span><span class="macro">!</span>(); 32 <span class="macro">unimplemented</span><span class="macro">!</span>();
31 <span class="function">foo</span>::&lt;<span class="type">i32</span>&gt;(); 33 <span class="function">foo</span>::&lt;<span class="type.builtin">i32</span>&gt;();
32} 34}
33 35
34<span class="comment">// comment</span> 36<span class="comment">// comment</span>
35<span class="keyword">fn</span> <span class="function">main</span>() { 37<span class="keyword">fn</span> <span class="function">main</span>() {
36 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal">92</span>); 38 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal.numeric">92</span>);
37 39
38 <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>(); 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>();
39 <span class="keyword.control">if</span> <span class="keyword">true</span> { 41 <span class="keyword.control">if</span> <span class="keyword">true</span> {
40 <span class="variable.mut">vec</span>.<span class="text">push</span>(<span class="type">Foo</span> { <span class="field">x</span>: <span class="literal">0</span>, <span class="field">y</span>: <span class="literal">1</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> });
41 } 43 }
42 <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal">0</span>); } 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>); }
43 45
44 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">x</span> = <span class="literal">42</span>; 46 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">x</span> = <span class="literal.numeric">42</span>;
45 <span class="keyword">let</span> <span class="variable.mut">y</span> = &<span class="keyword">mut</span> <span class="variable.mut">x</span>; 47 <span class="keyword">let</span> <span class="variable.mut">y</span> = &<span class="keyword">mut</span> <span class="variable.mut">x</span>;
46 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>; 48 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>;
47 49
48 <span class="variable.mut">y</span>; 50 <span class="variable.mut">y</span>;
49} 51}
50 52
51<span class="keyword">enum</span> <span class="type">E</span>&lt;<span class="type">X</span>&gt; { 53<span class="keyword">enum</span> <span class="type">E</span>&lt;<span class="type.param">X</span>&gt; {
52 <span class="constant">V</span>(<span class="type">X</span>) 54 <span class="constant">V</span>(<span class="type.param">X</span>)
53} 55}
54 56
55<span class="keyword">impl</span>&lt;<span class="type">X</span>&gt; <span class="type">E</span>&lt;<span class="type">X</span>&gt; { 57<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; {
56 <span class="keyword">fn</span> <span class="function">new</span>&lt;<span class="type">T</span>&gt;() -&gt; <span class="type">E</span>&lt;<span class="type">T</span>&gt; {} 58 <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; {}
57}</code></pre> \ No newline at end of file 59}</code></pre> \ No newline at end of file