Content-Length: 15866 | pFad | https://doc.rust-lang.org/reference/../std/../std/vec/../../reference/items/../types/never.html

Never type - The Rust Reference

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Never type

Syntax
NeverType!

The never type ! is a type with no values, representing the result of computations that never complete.

Expressions of type ! can be coerced into any other type.

The ! type can only appear in function return types presently, indicating it is a diverging function that never returns.

#![allow(unused)]
fn main() {
fn foo() -> ! {
    panic!("This call never returns.");
}
}
#![allow(unused)]
fn main() {
unsafe extern "C" {
    pub safe fn no_return_extern_func() -> !;
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/reference/../std/../std/vec/../../reference/items/../types/never.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy