aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/snapshots/highlight_unsafe.html
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlight_unsafe.html')
-rw-r--r--crates/ra_ide/src/snapshots/highlight_unsafe.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/crates/ra_ide/src/snapshots/highlight_unsafe.html b/crates/ra_ide/src/snapshots/highlight_unsafe.html
index fa986a3bc..6936e949f 100644
--- a/crates/ra_ide/src/snapshots/highlight_unsafe.html
+++ b/crates/ra_ide/src/snapshots/highlight_unsafe.html
@@ -34,20 +34,20 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
34.keyword.unsafe { color: #BC8383; font-weight: bold; } 34.keyword.unsafe { color: #BC8383; font-weight: bold; }
35.control { font-style: italic; } 35.control { font-style: italic; }
36</style> 36</style>
37<pre><code><span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function declaration unsafe">unsafe_fn</span><span class="punctuation">(</span><span class="punctuation">)</span> <span class="punctuation">{</span><span class="punctuation">}</span> 37<pre><code><span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function declaration unsafe">unsafe_fn</span>() {}
38 38
39<span class="keyword">struct</span> <span class="struct declaration">HasUnsafeFn</span><span class="punctuation">;</span> 39<span class="keyword">struct</span> <span class="struct declaration">HasUnsafeFn</span>;
40 40
41<span class="keyword">impl</span> <span class="struct">HasUnsafeFn</span> <span class="punctuation">{</span> 41<span class="keyword">impl</span> <span class="struct">HasUnsafeFn</span> {
42 <span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function declaration unsafe">unsafe_method</span><span class="punctuation">(</span><span class="punctuation">&</span><span class="self_keyword">self</span><span class="punctuation">)</span> <span class="punctuation">{</span><span class="punctuation">}</span> 42 <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>) {}
43<span class="punctuation">}</span> 43}
44 44
45<span class="keyword">fn</span> <span class="function declaration">main</span><span class="punctuation">(</span><span class="punctuation">)</span> <span class="punctuation">{</span> 45<span class="keyword">fn</span> <span class="function declaration">main</span>() {
46 <span class="keyword">let</span> <span class="variable declaration">x</span> <span class="punctuation">=</span> <span class="punctuation">&</span><span class="numeric_literal">5</span> <span class="keyword">as</span> *<span class="keyword">const</span> <span class="builtin_type">usize</span><span class="punctuation">;</span> 46 <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>;
47 <span class="keyword unsafe">unsafe</span> <span class="punctuation">{</span> 47 <span class="keyword unsafe">unsafe</span> {
48 <span class="function unsafe">unsafe_fn</span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span> 48 <span class="function unsafe">unsafe_fn</span>();
49 <span class="struct">HasUnsafeFn</span><span class="punctuation">.</span><span class="function unsafe">unsafe_method</span><span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span> 49 <span class="struct">HasUnsafeFn</span>.<span class="function unsafe">unsafe_method</span>();
50 <span class="keyword">let</span> <span class="variable declaration">y</span> <span class="punctuation">=</span> <span class="operator unsafe">*</span><span class="punctuation">(</span><span class="variable">x</span><span class="punctuation">)</span><span class="punctuation">;</span> 50 <span class="keyword">let</span> <span class="variable declaration">y</span> = <span class="operator unsafe">*</span>(<span class="variable">x</span>);
51 <span class="keyword">let</span> <span class="variable declaration">z</span> <span class="punctuation">=</span> <span class="punctuation">-</span><span class="variable">x</span><span class="punctuation">;</span> 51 <span class="keyword">let</span> <span class="variable declaration">z</span> = -<span class="variable">x</span>;
52 <span class="punctuation">}</span> 52 }
53<span class="punctuation">}</span></code></pre> \ No newline at end of file 53}</code></pre> \ No newline at end of file