Postfix ! unwraps a T? or T! and panics on a missing value or error. The value here can't
be missing or fail, so the ! does nothing (and isn't a "not"; that's prefix !x).
Wrong#
fn main() {
let n = 1
print(n!)
}Fixed#
fn main() {
let n = 1
print(n)
}Common causes#
- A leftover
!after a function stopped returningT?orT!. - Rust-style macro syntax (
print!): Auk has none.