Skip to content

Commit fd3be79

Browse files
committed
---
yaml --- r: 113214 b: refs/heads/snap-stage3 c: 06fcb6b h: refs/heads/master v: v3
1 parent cc304cc commit fd3be79

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: abdacecdf86b4b5a4f432560445a24e1c5f4751b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6636215a44b27d1806a2ac646bde1d4ecaa801c4
4+
refs/heads/snap-stage3: 06fcb6b1c81f1f5190d431c169cd0c725fecf18e
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ mod unit;
4343
pub mod any;
4444
pub mod bool;
4545
pub mod finally;
46+
pub mod option;
4647
pub mod raw;
4748
pub mod char;
4849
pub mod tuple;

branches/snap-stage3/src/libstd/option.rs renamed to branches/snap-stage3/src/libcore/option.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
//! ```
140140
141141
use any::Any;
142-
use clone::Clone;
143142
use cmp::{Eq, TotalEq, TotalOrd};
144143
use default::Default;
145144
use iter::{Iterator, DoubleEndedIterator, FromIterator, ExactSize};
@@ -148,7 +147,7 @@ use mem;
148147
use slice;
149148

150149
/// The `Option`
151-
#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd, Show)]
150+
#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd)]
152151
pub enum Option<T> {
153152
/// No value
154153
None,

branches/snap-stage3/src/libstd/fmt/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,15 @@ impl<'a> Show for &'a any::Any {
12801280
fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") }
12811281
}
12821282

1283+
impl<T: Show> Show for Option<T> {
1284+
fn fmt(&self, f: &mut Formatter) -> Result {
1285+
match *self {
1286+
Some(ref t) => write!(f.buf, "Some({})", *t),
1287+
None => write!(f.buf, "None"),
1288+
}
1289+
}
1290+
}
1291+
12831292
impl Show for () {
12841293
fn fmt(&self, f: &mut Formatter) -> Result {
12851294
f.pad("()")

branches/snap-stage3/src/libstd/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ pub use core::container;
146146
pub use core::default;
147147
pub use core::intrinsics;
148148
pub use core::mem;
149+
pub use core::option;
149150
pub use core::ptr;
150151
pub use core::raw;
151152
pub use core::tuple;
@@ -222,7 +223,6 @@ pub mod hash;
222223

223224
/* Common data structures */
224225

225-
pub mod option;
226226
pub mod result;
227227
pub mod cell;
228228

0 commit comments

Comments
 (0)