]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/playground-syntax-error.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / rustdoc / playground-syntax-error.rs
CommitLineData
dfeec247
XL
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/// ```
17pub fn bar() {}
18
19// @has foo/fn.bar.html
20// @has - '//a[@class="test-arrow"]' "Run"
21// @has - '//*[@class="docblock"]' 'foo_recursive'