mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			271 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			271 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // 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() {}
 | 
