diff options
Diffstat (limited to 'src/libstd/bool.rs')
| -rw-r--r-- | src/libstd/bool.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/bool.rs b/src/libstd/bool.rs index 926e6e1f6b6..4ef50094139 100644 --- a/src/libstd/bool.rs +++ b/src/libstd/bool.rs @@ -24,6 +24,7 @@ Implementations of the following traits: * `Ord` * `TotalOrd` * `Eq` +* `Default` * `Zero` ## Various functions to compare `bool`s @@ -43,6 +44,7 @@ use to_str::ToStr; #[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering}; #[cfg(not(test))] use ops::Not; +#[cfg(not(test))] use default::Default; #[cfg(not(test))] use num::Zero; /** @@ -324,6 +326,11 @@ impl Eq for bool { } #[cfg(not(test))] +impl Default for bool { + fn default() -> bool { false } +} + +#[cfg(not(test))] impl Zero for bool { fn zero() -> bool { false } fn is_zero(&self) -> bool { *self == false } |
