mozilla/rust — pull request #6001 by jld (2013-04-22 16:27:43+00:00)
Title: Represent enums with nullable pointers where possible

Specifically: all enums with two variants, where one has zero size (and thus at most one inhabitant) and the other has a field where the null value would not be allowed (such as a safe pointer), are now represented by storing a null pointer in the field in question.

This is a generalization of representing `Option<~T>`, `Option<@T>`, and `Option<&T>` with nullable pointers, thus fixing Tony Hoare's “billion dollar mistake”.