summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-93197.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-93197.rs')
-rw-r--r--tests/ui/async-await/issue-93197.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-93197.rs b/tests/ui/async-await/issue-93197.rs
new file mode 100644
index 000000000..c627fe17a
--- /dev/null
+++ b/tests/ui/async-await/issue-93197.rs
@@ -0,0 +1,16 @@
+// Regression test for #93197
+// check-pass
+// edition:2021
+// compile-flags: -Zdrop-tracking
+
+#![feature(try_blocks)]
+
+use std::sync::{mpsc, mpsc::SendError};
+
+pub async fn foo() {
+ let (tx, _) = mpsc::channel();
+
+ let _: Result<(), SendError<&str>> = try { tx.send("hello")?; };
+}
+
+fn main() {}