os-rust/tests/ui/async-await/issue-93197.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
271 B
Rust
Raw Normal View History

2022-01-25 15:19:33 -08:00
// Regression test for #93197
2022-01-26 10:47:13 -08:00
//@ check-pass
2022-01-25 15:19:33 -08:00
//@ 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() {}