You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example is from hashmap, where a bucket is: struct Bucket<K,V> { hash: uint, key: K, value: V } and the hashmap keeps a vector of ~[Option<Bucket<K,V>>]
If this were a custom enum, the non-nullable pointer optimization could be used to eliminate the enum tag overhead if either K or V were such a non-nullable type.
Extend the optimization to handle a case like Option<Bucket> when possible.
Manual cusom enum was implemented in PR #9212 (not merged).