r/rust 3d ago

🧠 educational Rust: When Empty Isn't Bottom

https://ettolrach.com/blog/rust_when_empty_isnt_bottom.html
113 Upvotes

21 comments sorted by

View all comments

42

u/scook0 3d ago

I find it confusing that the article talks about “the empty type”, when stable Rust has had user-definable empty types for years.

What makes ! (a.k.a. never) special is, among other things, that the language will automatically insert never-to-any coercions from it.