diff options
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlighting.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 52 |
1 files changed, 26 insertions, 26 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><<span class="type.param">T</span>>() -> <span class="type.param">T</span> { | 33 | <span class="keyword">fn</span> <span class="function">foo</span><<span class="type param">T</span>>() -> <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>::<<span class="type.builtin">i32</span>>(); | 35 | <span class="function">foo</span>::<<span class="type builtin">i32</span>>(); |
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>() -> <span class="type.builtin">u32</span> { | 43 | <span class="keyword">fn</span> <span class="function">bar</span>() -> <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><<span class="type.param">X</span>> { | 66 | <span class="keyword">enum</span> <span class="type">E</span><<span class="type param">X</span>> { |
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><<span class="type.param">X</span>> <span class="type">E</span><<span class="type.param">X</span>> { | 70 | <span class="keyword">impl</span><<span class="type param">X</span>> <span class="type">E</span><<span class="type param">X</span>> { |
71 | <span class="keyword">fn</span> <span class="function">new</span><<span class="type.param">T</span>>() -> <span class="type">E</span><<span class="type.param">T</span>> {} | 71 | <span class="keyword">fn</span> <span class="function">new</span><<span class="type param">T</span>>() -> <span class="type">E</span><<span class="type param">T</span>> {} |
72 | }</code></pre> \ No newline at end of file | 72 | }</code></pre> \ No newline at end of file |