3 ms·
A special syntax construct at the parser level I think. In fact currently the `-> !` syntax for functions is it's own special syntax distinct (although v. simil
by nicoburns 6y ago
A special syntax construct at the parser level I think. In fact currently the `-> !` syntax for functions is it's own special syntax distinct (although v. similar in meaning) from the `!` type.
It's not a macro (macro invocations just use the same character), and you can't have a '!' in your own type names.
- Sharlin 6y agoYeah, in current stable Rust `-> !` is just a syntactic construct. But it is being reified into a proper first-class type [1], indeed in nightly you've been able to use it in most type positions for a while already (I actually forgot that the "basic" implementation is not yet stable!) [1] https://github.com/rust-lang/rust/issues/35121 https://github.com/rust-lang/rust/issues/35121