Skip to content

Commit d522a7c

Browse files
committed
---
yaml --- r: 151394 b: refs/heads/try2 c: 06fcb6b h: refs/heads/master v: v3
1 parent 504b46c commit d522a7c

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6636215a44b27d1806a2ac646bde1d4ecaa801c4
8+
refs/heads/try2: 06fcb6b1c81f1f5190d431c169cd0c725fecf18e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/src/libstd/option.rs renamed to branches/try2/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/try2/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/try2/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)