Let's examine Option<T>. We've already discussed Option<T> in this chapter; that it's subject to null pointer optimization on account of its empty None variant in particular. Option is as simple as you might imagine, being defined in src/libcore/option.rs:
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Option<T> { /// No value #[stable(feature = "rust1", since = "1.0.0")] None, /// Some value `T` #[stable(feature = "rust1", since = "1.0.0")] Some(#[stable(feature = "rust1", since = "1.0.0")] T), }
As is often the case with Rust internals, there are a great deal of flags around to control when and where new features land in which channel and how documentation ...