mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Remove logic to mark all doctest code as
This commit is contained in:
parent
a951108173
commit
66fc084a86
2 changed files with 13 additions and 14 deletions
|
@ -43,8 +43,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
<span class="comment documentation">/// # Examples</span>
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// ```</span>
|
||||
<span class="comment documentation">/// #</span> <span class="attribute documentation">#![</span><span class="function attribute documentation">allow</span><span class="attribute documentation">(unused_mut)]</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="keyword documentation">mut</span> <span class="variable declaration documentation mutable">foo</span>: <span class="struct documentation">Foo</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>();
|
||||
<span class="comment documentation">/// #</span> <span class="attribute">#![</span><span class="function attribute">allow</span><span class="attribute">(unused_mut)]</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">foo</span>: <span class="struct">Foo</span> = <span class="struct">Foo</span>::<span class="function">new</span>();
|
||||
<span class="comment documentation">/// ```</span>
|
||||
<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> {
|
||||
<span class="struct">Foo</span> { <span class="field">bar</span>: <span class="bool_literal">true</span> }
|
||||
|
@ -55,26 +55,26 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
<span class="comment documentation">/// # Examples</span>
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// ```</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">use</span> <span class="module documentation">x</span>::<span class="module documentation">y</span>;
|
||||
<span class="comment documentation">/// </span><span class="keyword">use</span> <span class="module">x</span>::<span class="module">y</span>;
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">foo</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>();
|
||||
<span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">foo</span> = <span class="struct">Foo</span>::<span class="function">new</span>();
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// </span><span class="comment documentation">// calls bar on foo</span>
|
||||
<span class="comment documentation">/// </span><span class="macro documentation">assert!</span>(foo.bar());
|
||||
<span class="comment documentation">/// </span><span class="comment">// calls bar on foo</span>
|
||||
<span class="comment documentation">/// </span><span class="macro">assert!</span>(foo.bar());
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">bar</span> = <span class="variable documentation">foo</span>.<span class="field documentation">bar</span> || <span class="struct documentation">Foo</span>::<span class="constant documentation">bar</span>;
|
||||
<span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">bar</span> = <span class="variable">foo</span>.<span class="field">bar</span> || <span class="struct">Foo</span>::<span class="constant">bar</span>;
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// </span><span class="comment documentation">/* multi-line
|
||||
</span><span class="comment documentation">/// </span><span class="comment documentation"> comment */</span>
|
||||
<span class="comment documentation">/// </span><span class="comment">/* multi-line
|
||||
</span><span class="comment documentation">/// </span><span class="comment"> comment */</span>
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">multi_line_string</span> = <span class="string_literal documentation">"Foo
|
||||
</span><span class="comment documentation">/// </span><span class="string_literal documentation"> bar
|
||||
</span><span class="comment documentation">/// </span><span class="string_literal documentation"> "</span>;
|
||||
<span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">multi_line_string</span> = <span class="string_literal">"Foo
|
||||
</span><span class="comment documentation">/// </span><span class="string_literal"> bar
|
||||
</span><span class="comment documentation">/// </span><span class="string_literal"> "</span>;
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// ```</span>
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// ```rust,no_run</span>
|
||||
<span class="comment documentation">/// </span><span class="keyword documentation">let</span> <span class="variable declaration documentation">foobar</span> = <span class="struct documentation">Foo</span>::<span class="function documentation">new</span>().<span class="function documentation">bar</span>();
|
||||
<span class="comment documentation">/// </span><span class="keyword">let</span> <span class="variable declaration">foobar</span> = <span class="struct">Foo</span>::<span class="function">new</span>().<span class="function">bar</span>();
|
||||
<span class="comment documentation">/// ```</span>
|
||||
<span class="comment documentation">///</span>
|
||||
<span class="comment documentation">/// ```sh</span>
|
||||
|
|
|
@ -168,7 +168,6 @@ pub(super) fn highlight_doc_comment(
|
|||
h.range.end() + end_offset.unwrap_or(start_offset),
|
||||
);
|
||||
|
||||
h.highlight |= HighlightModifier::Documentation;
|
||||
stack.add(h);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue