We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8beec62 commit 737311fCopy full SHA for 737311f
tests/ui/fmt/issue-122674-nested-await.rs
@@ -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