diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-23 14:17:53 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-06-23 17:13:50 +0100 |
commit | 2a56323537442958008d0fddd78e33df425b11a9 (patch) | |
tree | ee3a7043c21df2aab8be6b7bb2ab83dd6fe4b84f /crates/ra_ide/src/snapshots/highlight_doctest.html | |
parent | d8230acd84dc931f72b9dd32b8fbc2aa887d8b4b (diff) |
Update injection mechanism and stop injecting through highlight element, switch to more general new highlight tag, generic
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlight_doctest.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlight_doctest.html | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/crates/ra_ide/src/snapshots/highlight_doctest.html b/crates/ra_ide/src/snapshots/highlight_doctest.html index 95f3d2d1e..e8155def7 100644 --- a/crates/ra_ide/src/snapshots/highlight_doctest.html +++ b/crates/ra_ide/src/snapshots/highlight_doctest.html | |||
@@ -35,67 +35,67 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
35 | .control { font-style: italic; } | 35 | .control { font-style: italic; } |
36 | </style> | 36 | </style> |
37 | <pre><code><span class="comment documentation">/// ```</span> | 37 | <pre><code><span class="comment documentation">/// ```</span> |
38 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="punctuation injected">_</span> <span class="punctuation injected">=</span> <span class="string_literal injected">"early doctests should not go boom"</span><span class="punctuation injected">;</span><span class="punctuation injected"> | 38 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> _ = </span><span class="string_literal injected">"early doctests should not go boom"</span><span class="generic injected">;</span> |
39 | </span><span class="comment documentation">/// ```</span> | 39 | <span class="comment documentation">/// ```</span> |
40 | <span class="keyword">struct</span> <span class="struct declaration">Foo</span> <span class="punctuation">{</span> | 40 | <span class="keyword">struct</span> <span class="struct declaration">Foo</span> { |
41 | <span class="field declaration">bar</span><span class="punctuation">:</span> <span class="builtin_type">bool</span><span class="punctuation">,</span> | 41 | <span class="field declaration">bar</span>: <span class="builtin_type">bool</span>, |
42 | <span class="punctuation">}</span> | 42 | } |
43 | 43 | ||
44 | <span class="keyword">impl</span> <span class="struct">Foo</span> <span class="punctuation">{</span> | 44 | <span class="keyword">impl</span> <span class="struct">Foo</span> { |
45 | <span class="keyword">pub</span> <span class="keyword">const</span> <span class="constant declaration">bar</span><span class="punctuation">:</span> <span class="builtin_type">bool</span> <span class="punctuation">=</span> <span class="bool_literal">true</span><span class="punctuation">;</span> | 45 | <span class="keyword">pub</span> <span class="keyword">const</span> <span class="constant declaration">bar</span>: <span class="builtin_type">bool</span> = <span class="bool_literal">true</span>; |
46 | 46 | ||
47 | <span class="comment documentation">/// Constructs a new `Foo`.</span> | 47 | <span class="comment documentation">/// Constructs a new `Foo`.</span> |
48 | <span class="comment documentation">///</span> | 48 | <span class="comment documentation">///</span> |
49 | <span class="comment documentation">/// # Examples</span> | 49 | <span class="comment documentation">/// # Examples</span> |
50 | <span class="comment documentation">///</span> | 50 | <span class="comment documentation">///</span> |
51 | <span class="comment documentation">/// ```</span> | 51 | <span class="comment documentation">/// ```</span> |
52 | <span class="comment documentation">/// #</span> <span class="punctuation injected">#</span><span class="punctuation injected">!</span><span class="punctuation injected">[</span><span class="function attribute injected">allow</span><span class="punctuation injected">(</span><span class="attribute injected">unused_mut</span><span class="punctuation injected">)</span><span class="punctuation injected">]</span> | 52 | <span class="comment documentation">/// #</span><span class="generic injected"> </span><span class="attribute injected">#![</span><span class="function attribute injected">allow</span><span class="attribute injected">(unused_mut)]</span> |
53 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="keyword injected">mut</span> <span class="variable declaration injected mutable">foo</span><span class="punctuation injected">:</span> <span class="struct injected">Foo</span> <span class="punctuation injected">=</span> <span class="struct injected">Foo</span><span class="punctuation injected">::</span><span class="function injected">new</span><span class="punctuation injected">(</span><span class="punctuation injected">)</span><span class="punctuation injected">;</span><span class="punctuation injected"> | 53 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> </span><span class="keyword injected">mut</span><span class="generic injected"> </span><span class="variable declaration injected mutable">foo</span><span class="generic injected">: </span><span class="struct injected">Foo</span><span class="generic injected"> = </span><span class="struct injected">Foo</span><span class="generic injected">::</span><span class="function injected">new</span><span class="generic injected">();</span> |
54 | </span> <span class="comment documentation">/// ```</span> | 54 | <span class="comment documentation">/// ```</span> |
55 | <span class="keyword">pub</span> <span class="keyword">const</span> <span class="keyword">fn</span> <span class="function declaration">new</span><span class="punctuation">(</span><span class="punctuation">)</span> <span class="punctuation">-></span> <span class="struct">Foo</span> <span class="punctuation">{</span> | 55 | <span class="keyword">pub</span> <span class="keyword">const</span> <span class="keyword">fn</span> <span class="function declaration">new</span>() -> <span class="struct">Foo</span> { |
56 | <span class="struct">Foo</span> <span class="punctuation">{</span> <span class="field">bar</span><span class="punctuation">:</span> <span class="bool_literal">true</span> <span class="punctuation">}</span> | 56 | <span class="struct">Foo</span> { <span class="field">bar</span>: <span class="bool_literal">true</span> } |
57 | <span class="punctuation">}</span> | 57 | } |
58 | 58 | ||
59 | <span class="comment documentation">/// `bar` method on `Foo`.</span> | 59 | <span class="comment documentation">/// `bar` method on `Foo`.</span> |
60 | <span class="comment documentation">///</span> | 60 | <span class="comment documentation">///</span> |
61 | <span class="comment documentation">/// # Examples</span> | 61 | <span class="comment documentation">/// # Examples</span> |
62 | <span class="comment documentation">///</span> | 62 | <span class="comment documentation">///</span> |
63 | <span class="comment documentation">/// ```</span> | 63 | <span class="comment documentation">/// ```</span> |
64 | <span class="comment documentation">/// </span><span class="keyword injected">use</span> <span class="module injected">x</span><span class="punctuation injected">::</span><span class="module injected">y</span><span class="punctuation injected">;</span> | 64 | <span class="comment documentation">/// </span><span class="keyword injected">use</span><span class="generic injected"> </span><span class="module injected">x</span><span class="generic injected">::</span><span class="module injected">y</span><span class="generic injected">;</span> |
65 | <span class="comment documentation">///</span> | 65 | <span class="comment documentation">///</span> |
66 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="variable declaration injected">foo</span> <span class="punctuation injected">=</span> <span class="struct injected">Foo</span><span class="punctuation injected">::</span><span class="function injected">new</span><span class="punctuation injected">(</span><span class="punctuation injected">)</span><span class="punctuation injected">;</span> | 66 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> </span><span class="variable declaration injected">foo</span><span class="generic injected"> = </span><span class="struct injected">Foo</span><span class="generic injected">::</span><span class="function injected">new</span><span class="generic injected">();</span> |
67 | <span class="comment documentation">///</span> | 67 | <span class="comment documentation">///</span> |
68 | <span class="comment documentation">/// </span><span class="comment injected">// calls bar on foo</span> | 68 | <span class="comment documentation">/// </span><span class="comment injected">// calls bar on foo</span> |
69 | <span class="comment documentation">/// </span><span class="macro injected">assert!</span><span class="punctuation injected">(</span>foo<span class="punctuation injected">.</span>bar<span class="punctuation injected">(</span><span class="punctuation injected">)</span><span class="punctuation injected">)</span><span class="punctuation injected">;</span> | 69 | <span class="comment documentation">/// </span><span class="macro injected">assert!</span><span class="generic injected">(foo.bar());</span> |
70 | <span class="comment documentation">///</span> | 70 | <span class="comment documentation">///</span> |
71 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="variable declaration injected">bar</span> <span class="punctuation injected">=</span> <span class="variable injected">foo</span><span class="punctuation injected">.</span><span class="field injected">bar</span> <span class="punctuation injected">||</span> <span class="struct injected">Foo</span><span class="punctuation injected">::</span><span class="constant injected">bar</span><span class="punctuation injected">;</span> | 71 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> </span><span class="variable declaration injected">bar</span><span class="generic injected"> = </span><span class="variable injected">foo</span><span class="generic injected">.</span><span class="field injected">bar</span><span class="generic injected"> || </span><span class="struct injected">Foo</span><span class="generic injected">::</span><span class="constant injected">bar</span><span class="generic injected">;</span> |
72 | <span class="comment documentation">///</span> | 72 | <span class="comment documentation">///</span> |
73 | <span class="comment documentation">/// </span><span class="comment injected">/* multi-line | 73 | <span class="comment documentation">/// </span><span class="comment injected">/* multi-line |
74 | </span><span class="comment documentation">/// </span><span class="comment injected"> comment */</span> | 74 | </span><span class="comment documentation">/// </span><span class="comment injected"> comment */</span> |
75 | <span class="comment documentation">///</span> | 75 | <span class="comment documentation">///</span> |
76 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="variable declaration injected">multi_line_string</span> <span class="punctuation injected">=</span> <span class="string_literal injected">"Foo | 76 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> </span><span class="variable declaration injected">multi_line_string</span><span class="generic injected"> = </span><span class="string_literal injected">"Foo |
77 | </span><span class="comment documentation">/// </span><span class="string_literal injected"> bar | 77 | </span><span class="comment documentation">/// </span><span class="string_literal injected"> bar |
78 | </span><span class="comment documentation">/// </span><span class="string_literal injected"> "</span><span class="punctuation injected">;</span> | 78 | </span><span class="comment documentation">/// </span><span class="string_literal injected"> "</span><span class="generic injected">;</span> |
79 | <span class="comment documentation">///</span> | 79 | <span class="comment documentation">///</span> |
80 | <span class="comment documentation">/// ```</span> | 80 | <span class="comment documentation">/// ```</span> |
81 | <span class="comment documentation">///</span> | 81 | <span class="comment documentation">///</span> |
82 | <span class="comment documentation">/// ```rust,no_run</span> | 82 | <span class="comment documentation">/// ```rust,no_run</span> |
83 | <span class="comment documentation">/// </span><span class="keyword injected">let</span> <span class="variable declaration injected">foobar</span> <span class="punctuation injected">=</span> <span class="struct injected">Foo</span><span class="punctuation injected">::</span><span class="function injected">new</span><span class="punctuation injected">(</span><span class="punctuation injected">)</span><span class="punctuation injected">.</span><span class="function injected">bar</span><span class="punctuation injected">(</span><span class="punctuation injected">)</span><span class="punctuation injected">;</span><span class="punctuation injected"> | 83 | <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="generic injected"> </span><span class="variable declaration injected">foobar</span><span class="generic injected"> = </span><span class="struct injected">Foo</span><span class="generic injected">::</span><span class="function injected">new</span><span class="generic injected">().</span><span class="function injected">bar</span><span class="generic injected">();</span> |
84 | </span> <span class="comment documentation">/// ```</span> | 84 | <span class="comment documentation">/// ```</span> |
85 | <span class="comment documentation">///</span> | 85 | <span class="comment documentation">///</span> |
86 | <span class="comment documentation">/// ```sh</span> | 86 | <span class="comment documentation">/// ```sh</span> |
87 | <span class="comment documentation">/// echo 1</span> | 87 | <span class="comment documentation">/// echo 1</span> |
88 | <span class="comment documentation">/// ```</span> | 88 | <span class="comment documentation">/// ```</span> |
89 | <span class="keyword">pub</span> <span class="keyword">fn</span> <span class="function declaration">foo</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="builtin_type">bool</span> <span class="punctuation">{</span> | 89 | <span class="keyword">pub</span> <span class="keyword">fn</span> <span class="function declaration">foo</span>(&<span class="self_keyword">self</span>) -> <span class="builtin_type">bool</span> { |
90 | <span class="bool_literal">true</span> | 90 | <span class="bool_literal">true</span> |
91 | <span class="punctuation">}</span> | 91 | } |
92 | <span class="punctuation">}</span> | 92 | } |
93 | 93 | ||
94 | <span class="comment documentation">/// ```</span> | 94 | <span class="comment documentation">/// ```</span> |
95 | <span class="comment documentation">/// </span><span class="macro injected">noop!</span><span class="punctuation injected">(</span><span class="numeric_literal injected">1</span><span class="punctuation injected">)</span><span class="punctuation injected">;</span><span class="punctuation injected"> | 95 | <span class="comment documentation">/// </span><span class="macro injected">noop!</span><span class="generic injected">(</span><span class="numeric_literal injected">1</span><span class="generic injected">);</span> |
96 | </span><span class="comment documentation">/// ```</span> | 96 | <span class="comment documentation">/// ```</span> |
97 | <span class="macro">macro_rules!</span> <span class="macro declaration">noop</span> <span class="punctuation">{</span> | 97 | <span class="macro">macro_rules!</span> <span class="macro declaration">noop</span> { |
98 | <span class="punctuation">(</span><span class="punctuation">$</span>expr<span class="punctuation">:</span>expr<span class="punctuation">)</span> <span class="punctuation">=</span><span class="punctuation">></span> <span class="punctuation">{</span> | 98 | ($expr:expr) => { |
99 | <span class="punctuation">$</span>expr | 99 | $expr |
100 | <span class="punctuation">}</span> | 100 | } |
101 | <span class="punctuation">}</span></code></pre> \ No newline at end of file | 101 | }</code></pre> \ No newline at end of file |