Get the latest tech news
A surprising enum size optimization in the Rust compiler
Personal website of James Fennell
A quick search reveals that this number is exactly one bigger than the largest valid Unicode code point. My understanding was that Rust doesn’t perform any more optimizations, so I was pleasantly surprised recently when I found one. Already we see something weird happening: Rust has chosen to use the tag number 2 for Outer::C instead of starting from 0 like it did for Inner::A.
Or read this on Hacker News