With #120104, a function with a ! pattern in a binding is detected as diverging:
fn never_arg(!: Void) -> ! {}
fn never_let(x: Void) -> ! {
let ! = x;
}
This doesn't work the arguments of an async fn however:
async fn never_let(x: Void) -> ! {
let ! = x;
} // ok
async fn never_arg(!: Void) -> ! {} // ERROR mistmatched types
With #120104, a function with a
!pattern in a binding is detected as diverging:This doesn't work the arguments of an
asyncfn however: