Answer the question
In order to leave comments, you need to log in
What does ->! in Rust?
Example from source:
pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
Answer the question
In order to leave comments, you need to log in
For incomprehensible pieces of syntax, there is an excellent page - https://doc.rust-lang.org/book/first-edition/synta...
There is an easy item "!: always empty Never type. See Diverging Functions", referring to the details in the first edition of the Book:
- https://doc.rust-lang.org/book/first-edition/funct...
- https://rurust.github.io/rust_book_ru/src/function...
Very briefly , such a return type of a function means that it will never return control.
The function never returns, which allows it to be called as if it were returning any given type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question