Skip to main content

never

Function never 

Source
pub const fn never<T>(x: Infallible) -> T
Expand description

Helper for matching against Sugar(Infallible) arms.

In post-desugar code, match decl.kind { ..., Sugar(s) => never(s) } is the canonical way to handle the impossible case without runtime panic.