There are a number of places where we can see exclamation marks !
in Rust.
Never type
As the designated return type of a function:
fn foo() -> ! {
...
}
Diverging Functions - functions that never return
Macros
At the end of "function" names:
println!("Hello World");
Functions that end with an exclamation mark !
Boolean not
In boolean expressions:
if ! var.is_empty() {
...
}
Not equal !=
Comparing values for lack of equality:
if answer != 42 {
...
}