Improve highlighting test

This commit is contained in:
Aleksey Kladov 2019-12-20 14:10:31 +01:00
parent a2ce8ab275
commit d057afb945
3 changed files with 7 additions and 2 deletions

View file

@ -5,6 +5,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
.comment { color: #7F9F7F; }
.string { color: #CC9393; }
.field { color: #94BFF3; }
.function { color: #93E0E3; }
.parameter { color: #94BFF3; }
.text { color: #DCDCCC; }
@ -39,7 +40,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
<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>();
<span class="keyword.control">if</span> <span class="keyword">true</span> {
<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> });
<span class="keyword">let</span> <span class="variable">x</span> = <span class="literal.numeric">92</span>;
<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> });
}
<span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal.numeric">0</span>); }

View file

@ -5,6 +5,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
.comment { color: #7F9F7F; }
.string { color: #CC9393; }
.field { color: #94BFF3; }
.function { color: #93E0E3; }
.parameter { color: #94BFF3; }
.text { color: #DCDCCC; }

View file

@ -282,6 +282,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
.comment { color: #7F9F7F; }
.string { color: #CC9393; }
.field { color: #94BFF3; }
.function { color: #93E0E3; }
.parameter { color: #94BFF3; }
.text { color: #DCDCCC; }
@ -327,7 +328,8 @@ fn main() {
let mut vec = Vec::new();
if true {
vec.push(Foo { x: 0, y: 1 });
let x = 92;
vec.push(Foo { x, y: 1 });
}
unsafe { vec.set_len(0); }