summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-93197.rs
blob: 05ec013d0afd88666d21158eb5b2add9417f9829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for #93197
// check-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() {}