rust/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs
2024-01-22 16:24:37 +01:00

17 lines
293 B
Rust

// edition: 2018
// known-bug: #120240
#![feature(never_patterns)]
#![allow(incomplete_features)]
fn main() {}
enum Void {}
// Divergence is not detected.
async fn async_never(!: Void) -> ! {} // gives an error
// Divergence is detected
async fn async_let(x: Void) -> ! {
let ! = x;
}