diff options
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlight_unsafe.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlight_unsafe.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/crates/ra_ide/src/snapshots/highlight_unsafe.html b/crates/ra_ide/src/snapshots/highlight_unsafe.html new file mode 100644 index 000000000..bd24e6e38 --- /dev/null +++ b/crates/ra_ide/src/snapshots/highlight_unsafe.html | |||
@@ -0,0 +1,49 @@ | |||
1 | |||
2 | <style> | ||
3 | body { margin: 0; } | ||
4 | pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } | ||
5 | |||
6 | .lifetime { color: #DFAF8F; font-style: italic; } | ||
7 | .comment { color: #7F9F7F; } | ||
8 | .struct, .enum { color: #7CB8BB; } | ||
9 | .enum_variant { color: #BDE0F3; } | ||
10 | .string_literal { color: #CC9393; } | ||
11 | .field { color: #94BFF3; } | ||
12 | .function { color: #93E0E3; } | ||
13 | .function.unsafe { color: #BC8383; } | ||
14 | .operator.unsafe { color: #BC8383; } | ||
15 | .parameter { color: #94BFF3; } | ||
16 | .text { color: #DCDCCC; } | ||
17 | .type { color: #7CB8BB; } | ||
18 | .builtin_type { color: #8CD0D3; } | ||
19 | .type_param { color: #DFAF8F; } | ||
20 | .attribute { color: #94BFF3; } | ||
21 | .numeric_literal { color: #BFEBBF; } | ||
22 | .bool_literal { color: #BFE6EB; } | ||
23 | .macro { color: #94BFF3; } | ||
24 | .module { color: #AFD8AF; } | ||
25 | .variable { color: #DCDCCC; } | ||
26 | .format_specifier { color: #CC696B; } | ||
27 | .mutable { text-decoration: underline; } | ||
28 | |||
29 | .keyword { color: #F0DFAF; font-weight: bold; } | ||
30 | .keyword.unsafe { color: #BC8383; font-weight: bold; } | ||
31 | .control { font-style: italic; } | ||
32 | </style> | ||
33 | <pre><code><span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function declaration unsafe">unsafe_fn</span>() {} | ||
34 | |||
35 | <span class="keyword">struct</span> <span class="struct declaration">HasUnsafeFn</span>; | ||
36 | |||
37 | <span class="keyword">impl</span> <span class="struct">HasUnsafeFn</span> { | ||
38 | <span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function declaration unsafe">unsafe_method</span>(&<span class="self_keyword">self</span>) {} | ||
39 | } | ||
40 | |||
41 | <span class="keyword">fn</span> <span class="function declaration">main</span>() { | ||
42 | <span class="keyword">let</span> <span class="variable declaration">x</span> = &<span class="numeric_literal">5</span> <span class="keyword">as</span> *<span class="keyword">const</span> <span class="builtin_type">usize</span>; | ||
43 | <span class="keyword unsafe">unsafe</span> { | ||
44 | <span class="function unsafe">unsafe_fn</span>(); | ||
45 | <span class="struct">HasUnsafeFn</span>.<span class="function unsafe">unsafe_method</span>(); | ||
46 | <span class="keyword">let</span> <span class="variable declaration">y</span> = <span class="operator unsafe">*</span>(<span class="variable">x</span>); | ||
47 | <span class="keyword">let</span> <span class="variable declaration">z</span> = -<span class="variable">x</span>; | ||
48 | } | ||
49 | }</code></pre> \ No newline at end of file | ||