aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/snapshots
diff options
context:
space:
mode:
authorEkaterina Babshukova <[email protected]>2019-07-18 16:49:32 +0100
committerEkaterina Babshukova <[email protected]>2019-07-18 16:52:50 +0100
commit4abe03879bbd11536fbb51b30342cdad74317025 (patch)
tree33266be000ef9aabe1049916d9772af70a4249b5 /crates/ra_ide_api/src/snapshots
parenta15a278308047b160e5805dbb554a1949fcb0228 (diff)
highlight mutable variables differently
Diffstat (limited to 'crates/ra_ide_api/src/snapshots')
-rw-r--r--crates/ra_ide_api/src/snapshots/highlighting.html45
-rw-r--r--crates/ra_ide_api/src/snapshots/rainbow_highlighting.html29
2 files changed, 41 insertions, 33 deletions
diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html
index d79d35bf3..709816d0d 100644
--- a/crates/ra_ide_api/src/snapshots/highlighting.html
+++ b/crates/ra_ide_api/src/snapshots/highlighting.html
@@ -1,21 +1,22 @@
1 1
2<style> 2<style>
3body { margin: 0; } 3body { margin: 0; }
4pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } 4pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; }
5 5
6.comment { color: #7F9F7F; } 6.comment { color: #7F9F7F; }
7.string { color: #CC9393; } 7.string { color: #CC9393; }
8.function { color: #93E0E3; } 8.function { color: #93E0E3; }
9.parameter { color: #94BFF3; } 9.parameter { color: #94BFF3; }
10.builtin { color: #DD6718; } 10.builtin { color: #DD6718; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.attribute { color: #BFEBBF; } 12.attribute { color: #BFEBBF; }
13.literal { color: #DFAF8F; } 13.literal { color: #DFAF8F; }
14.macro { color: #DFAF8F; } 14.macro { color: #DFAF8F; }
15 15.variable\.mut { color: #DFAF8F; }
16.keyword { color: #F0DFAF; } 16
17.keyword\.unsafe { color: #F0DFAF; font-weight: bold; } 17.keyword { color: #F0DFAF; }
18.keyword\.control { color: #DC8CC3; } 18.keyword\.unsafe { color: #F0DFAF; font-weight: bold; }
19.keyword\.control { color: #DC8CC3; }
19</style> 20</style>
20<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> 21<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>
21<span class="keyword">struct</span> <span class="type">Foo</span> { 22<span class="keyword">struct</span> <span class="type">Foo</span> {
@@ -32,9 +33,15 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4e
32<span class="keyword">fn</span> <span class="function">main</span>() { 33<span class="keyword">fn</span> <span class="function">main</span>() {
33 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal">92</span>); 34 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal">92</span>);
34 35
35 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable" data-binding-hash="9636295041291189729" style="color: hsl(51,57%,74%);">vec</span> = <span class="text">Vec</span>::<span class="text">new</span>(); 36 <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>();
36 <span class="keyword.control">if</span> <span class="keyword">true</span> { 37 <span class="keyword.control">if</span> <span class="keyword">true</span> {
37 <span class="variable" data-binding-hash="8496027264380925433" style="color: hsl(18,48%,55%);">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> }); 38 <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> });
38 } 39 }
39 <span class="keyword.unsafe">unsafe</span> { <span class="variable" data-binding-hash="8496027264380925433" style="color: hsl(18,48%,55%);">vec</span>.<span class="text">set_len</span>(<span class="literal">0</span>); } 40 <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal">0</span>); }
41
42 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">x</span> = <span class="literal">42</span>;
43 <span class="keyword">let</span> <span class="variable.mut">y</span> = &<span class="keyword">mut</span> <span class="variable.mut">x</span>;
44 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>;
45
46 <span class="variable.mut">y</span>;
40}</code></pre> \ No newline at end of file 47}</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html b/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html
index 729d129d0..ad3935b5d 100644
--- a/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html
+++ b/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html
@@ -1,21 +1,22 @@
1 1
2<style> 2<style>
3body { margin: 0; } 3body { margin: 0; }
4pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } 4pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; }
5 5
6.comment { color: #7F9F7F; } 6.comment { color: #7F9F7F; }
7.string { color: #CC9393; } 7.string { color: #CC9393; }
8.function { color: #93E0E3; } 8.function { color: #93E0E3; }
9.parameter { color: #94BFF3; } 9.parameter { color: #94BFF3; }
10.builtin { color: #DD6718; } 10.builtin { color: #DD6718; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.attribute { color: #BFEBBF; } 12.attribute { color: #BFEBBF; }
13.literal { color: #DFAF8F; } 13.literal { color: #DFAF8F; }
14.macro { color: #DFAF8F; } 14.macro { color: #DFAF8F; }
15.variable\.mut { color: #DFAF8F; }
15 16
16.keyword { color: #F0DFAF; } 17.keyword { color: #F0DFAF; }
17.keyword\.unsafe { color: #F0DFAF; font-weight: bold; } 18.keyword\.unsafe { color: #F0DFAF; font-weight: bold; }
18.keyword\.control { color: #DC8CC3; } 19.keyword\.control { color: #DC8CC3; }
19</style> 20</style>
20<pre><code><span class="keyword">fn</span> <span class="function">main</span>() { 21<pre><code><span class="keyword">fn</span> <span class="function">main</span>() {
21 <span class="keyword">let</span> <span class="variable" data-binding-hash="3888301305669440875" style="color: hsl(242,59%,59%);">hello</span> = <span class="string">"hello"</span>; 22 <span class="keyword">let</span> <span class="variable" data-binding-hash="3888301305669440875" style="color: hsl(242,59%,59%);">hello</span> = <span class="string">"hello"</span>;