Skip to content

Commit f3e9dfa

Browse files
committed
add non-regression test for issue 122674
1 parent 8beec62 commit f3e9dfa

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Non-regression test for issue #122674: a change in the format args visitor missed nested awaits.
2+
3+
//@ edition: 2021
4+
//@ check-pass
5+
6+
pub fn f1() -> impl std::future::Future<Output = Result<(), String>> + Send {
7+
async {
8+
should_work().await?;
9+
Ok(())
10+
}
11+
}
12+
13+
async fn should_work() -> Result<String, String> {
14+
let x = 1;
15+
Err(format!("test: {}: {}", x, inner().await?))
16+
}
17+
18+
async fn inner() -> Result<String, String> {
19+
Ok("test".to_string())
20+
}
21+
22+
fn main() {}

0 commit comments

Comments
 (0)