diff options
| -rw-r--r-- | src/librustdoc/html/highlight/fixtures/decorations.html | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/highlight/fixtures/sample.html | 15 | ||||
| -rw-r--r-- | src/librustdoc/html/highlight/fixtures/sample.rs | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-41783.codeblock.html | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-41783.rs | 6 |
5 files changed, 17 insertions, 13 deletions
diff --git a/src/librustdoc/html/highlight/fixtures/decorations.html b/src/librustdoc/html/highlight/fixtures/decorations.html index 21848978721..f73e7c1fe76 100644 --- a/src/librustdoc/html/highlight/fixtures/decorations.html +++ b/src/librustdoc/html/highlight/fixtures/decorations.html @@ -1,2 +1,2 @@ -<span class="example"><span class="kw">let </span>x = <span class="number">1</span>;</span> -<span class="kw">let </span>y = <span class="number">2</span>; \ No newline at end of file +<span class="example"><span class="kw">let </span>x = <span class="number">1</span>; +</span><span class="kw">let </span>y = <span class="number">2</span>; \ No newline at end of file diff --git a/src/librustdoc/html/highlight/fixtures/sample.html b/src/librustdoc/html/highlight/fixtures/sample.html index ae2650528eb..4a5a3cf609c 100644 --- a/src/librustdoc/html/highlight/fixtures/sample.html +++ b/src/librustdoc/html/highlight/fixtures/sample.html @@ -8,12 +8,13 @@ .lifetime { color: #B76514; } .question-mark { color: #ff9011; } </style> -<pre><code><span class="attribute">#![crate_type = <span class="string">"lib"</span>]</span> +<pre><code><span class="attribute">#![crate_type = <span class="string">"lib"</span>] -<span class="kw">use </span>std::path::{Path, PathBuf}; +</span><span class="kw">use </span>std::path::{Path, PathBuf}; -<span class="attribute">#[cfg(target_os = <span class="string">"linux"</span>)]</span> -<span class="kw">fn </span>main() -> () { +<span class="attribute">#[cfg(target_os = <span class="string">"linux"</span>)] +#[cfg(target_os = <span class="string">"windows"</span>)] +</span><span class="kw">fn </span>main() -> () { <span class="kw">let </span>foo = <span class="bool-val">true </span>&& <span class="bool-val">false </span>|| <span class="bool-val">true</span>; <span class="kw">let _</span>: <span class="kw-2">*const </span>() = <span class="number">0</span>; <span class="kw">let _ </span>= <span class="kw-2">&</span>foo; @@ -22,8 +23,8 @@ <span class="macro">mac!</span>(foo, <span class="kw-2">&mut </span>bar); <span class="macro">assert!</span>(<span class="self">self</span>.length < N && index <= <span class="self">self</span>.length); ::std::env::var(<span class="string">"gateau"</span>).is_ok(); - <span class="attribute">#[rustfmt::skip]</span> - <span class="kw">let </span>s:std::path::PathBuf = std::path::PathBuf::new(); + <span class="attribute">#[rustfmt::skip] + </span><span class="kw">let </span>s:std::path::PathBuf = std::path::PathBuf::new(); <span class="kw">let </span><span class="kw-2">mut </span>s = String::new(); <span class="kw">match </span><span class="kw-2">&</span>s { @@ -31,7 +32,7 @@ } } -<span class="macro">macro_rules!</span> bar { +<span class="macro">macro_rules! </span>bar { (<span class="macro-nonterminal">$foo</span>:tt) => {}; } </code></pre> diff --git a/src/librustdoc/html/highlight/fixtures/sample.rs b/src/librustdoc/html/highlight/fixtures/sample.rs index fbfdc676733..ef85b566cb3 100644 --- a/src/librustdoc/html/highlight/fixtures/sample.rs +++ b/src/librustdoc/html/highlight/fixtures/sample.rs @@ -3,6 +3,7 @@ use std::path::{Path, PathBuf}; #[cfg(target_os = "linux")] +#[cfg(target_os = "windows")] fn main() -> () { let foo = true && false || true; let _: *const () = 0; diff --git a/src/test/rustdoc/issue-41783.codeblock.html b/src/test/rustdoc/issue-41783.codeblock.html index b919935e4b4..89987491d1b 100644 --- a/src/test/rustdoc/issue-41783.codeblock.html +++ b/src/test/rustdoc/issue-41783.codeblock.html @@ -1,5 +1,5 @@ <code># single ## double ### triple -<span class="attribute">#[outer]</span> -<span class="attribute">#![inner]</span></code> \ No newline at end of file +<span class="attribute">#[outer] +#![inner]</span></code> diff --git a/src/test/rustdoc/issue-41783.rs b/src/test/rustdoc/issue-41783.rs index d6771602879..87267a750c6 100644 --- a/src/test/rustdoc/issue-41783.rs +++ b/src/test/rustdoc/issue-41783.rs @@ -1,8 +1,10 @@ // @has issue_41783/struct.Foo.html // @!hasraw - 'space' // @!hasraw - 'comment' -// @hasraw - '<span class="attribute">#[outer]</span>' -// @hasraw - '<span class="attribute">#![inner]</span>' +// @hasraw - '<span class="attribute">#[outer]' +// @!hasraw - '<span class="attribute">#[outer]</span>' +// @hasraw - '#![inner]</span>' +// @!hasraw - '<span class="attribute">#![inner]</span>' // @snapshot 'codeblock' - '//*[@class="rustdoc-toggle top-doc"]/*[@class="docblock"]//pre/code' /// ```no_run |
