diff --git a/src/test/ui/async-await/issue-93197.rs b/src/test/ui/async-await/issue-93197.rs new file mode 100644 index 0000000000000..e1b220d365f18 --- /dev/null +++ b/src/test/ui/async-await/issue-93197.rs @@ -0,0 +1,15 @@ +// Regression test for #93197 +// build-pass +// edition:2021 + +#![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() {}