Update rustdoc tests
This commit is contained in:
parent
042e0d02d7
commit
f5b5d867d5
@ -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>;
|
||||
<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>;
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<code># single
|
||||
## double
|
||||
### triple
|
||||
<span class="attribute">#[outer]</span>
|
||||
<span class="attribute">#![inner]</span></code>
|
||||
<span class="attribute">#[outer]
|
||||
#![inner]</span></code>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user