]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/playground-syntax-error.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / rustdoc / playground-syntax-error.rs
1 #![crate_name = "foo"]
2 #![doc(html_playground_url = "https://play.rust-lang.org/")]
3
4 /// bar docs
5 ///
6 /// ```edition2015
7 /// use std::future::Future;
8 /// use std::pin::Pin;
9 /// fn foo_recursive(n: usize) -> Pin<Box<dyn Future<Output = ()>>> {
10 ///     Box::pin(async move {
11 ///         if n > 0 {
12 ///             foo_recursive(n - 1).await;
13 ///         }
14 ///     })
15 /// }
16 /// ```
17 pub fn bar() {}
18
19 // @has foo/fn.bar.html
20 // @has - '//a[@class="test-arrow"]' "Run"
21 // @has - '//*[@class="docblock"]' 'foo_recursive'