diff options
Diffstat (limited to 'crates/ra_ide/src/snapshots')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html index 8c372ad27..cb4097e05 100644 --- a/crates/ra_ide/src/snapshots/highlighting.html +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -65,10 +65,17 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
65 | <span class="variable mutable">y</span>; | 65 | <span class="variable mutable">y</span>; |
66 | } | 66 | } |
67 | 67 | ||
68 | <span class="keyword">enum</span> <span class="enum">E</span><<span class="type_param">X</span>> { | 68 | <span class="keyword">enum</span> <span class="enum">Option</span><<span class="type_param">T</span>> { |
69 | <span class="enum_variant">V</span>(<span class="type_param">X</span>) | 69 | <span class="enum_variant">Some</span>(<span class="type_param">T</span>), |
70 | <span class="enum_variant">None</span>, | ||
70 | } | 71 | } |
72 | <span class="keyword">use</span> <span class="enum">Option</span>::*; | ||
71 | 73 | ||
72 | <span class="keyword">impl</span><<span class="type_param">X</span>> <span class="enum">E</span><<span class="type_param">X</span>> { | 74 | <span class="keyword">impl</span><<span class="type_param">T</span>> <span class="enum">Option</span><<span class="type_param">T</span>> { |
73 | <span class="keyword">fn</span> <span class="function">new</span><<span class="type_param">T</span>>() -> <span class="enum">E</span><<span class="type_param">T</span>> {} | 75 | <span class="keyword">fn</span> <span class="function">and</span><<span class="type_param">U</span>>(<span class="keyword">self</span>, <span class="variable">other</span>: <span class="enum">Option</span><<span class="type_param">U</span>>) -> <span class="enum">Option</span><(<span class="type_param">T</span>, <span class="type_param">U</span>)> { |
76 | <span class="keyword control">match</span> <span class="variable">other</span> { | ||
77 | <span class="enum_variant">None</span> => <span class="macro">todo</span><span class="macro">!</span>(), | ||
78 | <span class="variable">Nope</span> => <span class="variable">Nope</span>, | ||
79 | } | ||
80 | } | ||
74 | }</code></pre> \ No newline at end of file | 81 | }</code></pre> \ No newline at end of file |