似乎不能使用#[tokio-test]来测试Rust文档测试中的异步函数?现在,我必须编写一个异步主函数,并用#[tokio-main]标记它,然后在其中调用test_fn().await,以便让一些异步函数在cargo test --doc期间运行。有没有其他更好的方法来允许文档测试像正常测试函数一样运行,例如使用#[tokio-test]?此外,如果标记#[tokio-test]可以显示在文档<
我试图在我的项目(src/subdir/subdir 2/file.rs)中获得工作测试:mod tests { async fn(expect, src);}error: the async keyword is missing from the functionproduct.rs:185:5185 | fn test_form