]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-93197.rs
Rollup merge of #106836 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / 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() {}