]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-93197.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / async-await / issue-93197.rs
1 // Regression test for #93197
2 // check-pass
3 // edition:2021
4 // compile-flags: -Zdrop-tracking
5
6 #![feature(try_blocks)]
7
8 use std::sync::{mpsc, mpsc::SendError};
9
10 pub async fn foo() {
11     let (tx, _) = mpsc::channel();
12
13     let _: Result<(), SendError<&str>> = try { tx.send("hello")?; };
14 }
15
16 fn main() {}