]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-93197.rs
Rollup merge of #93531 - TheColdVoid:patch-1, r=m-ou-se
[rust.git] / src / test / ui / async-await / issue-93197.rs
1 // Regression test for #93197
2 // check-pass
3 // edition:2021
4
5 #![feature(try_blocks)]
6
7 use std::sync::{mpsc, mpsc::SendError};
8
9 pub async fn foo() {
10     let (tx, _) = mpsc::channel();
11
12     let _: Result<(), SendError<&str>> = try { tx.send("hello")?; };
13 }
14
15 fn main() {}