diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 5ac6fcda0433..1f3a31a403cb 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -43,6 +43,7 @@ let unwrapped_msg = match msg { use clone::Clone; use cmp::{Eq,Ord}; +use default::Default; use util; use num::Zero; use iter; @@ -349,6 +350,10 @@ impl Option { } } +impl Default for Option { + fn default() -> Option { None } +} + impl Option { /// Returns the contained value or zero (for this type) #[inline]