Skip to content

Commit b5fd293

Browse files
committed
---
yaml --- r: 113853 b: refs/heads/master c: 8ed728b h: refs/heads/master i: 113851: 80386cd v: v3
1 parent 5198104 commit b5fd293

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 85a8e6b80ae91eb00a0bce96a5cec8017e1b37da
2+
refs/heads/master: 8ed728babb057c0f736a63a69ba772e45278148f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/src/libstd/any.rs renamed to trunk/src/libcore/any.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
//! the extension traits (`*Ext`) for the full details.
2222
2323
use cast::{transmute, transmute_copy};
24-
use fmt;
2524
use option::{Option, Some, None};
2625
use owned::Box;
2726
use raw::TraitObject;
@@ -145,22 +144,6 @@ impl AnyOwnExt for Box<Any> {
145144
}
146145
}
147146

148-
///////////////////////////////////////////////////////////////////////////////
149-
// Trait implementations
150-
///////////////////////////////////////////////////////////////////////////////
151-
152-
impl fmt::Show for Box<Any> {
153-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
154-
f.pad("Box<Any>")
155-
}
156-
}
157-
158-
impl<'a> fmt::Show for &'a Any {
159-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
160-
f.pad("&Any")
161-
}
162-
}
163-
164147
#[cfg(test)]
165148
mod tests {
166149
use prelude::*;

trunk/src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ pub mod container;
3737

3838
/* Core types and methods on primitives */
3939

40+
pub mod any;
4041
pub mod finally;
4142
pub mod char;

trunk/src/libstd/fmt/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,14 @@ impl<T> Show for *mut T {
12421242
fn fmt(&self, f: &mut Formatter) -> Result { secret_pointer(self, f) }
12431243
}
12441244

1245+
impl Show for Box<any::Any> {
1246+
fn fmt(&self, f: &mut Formatter) -> Result { f.pad("Box<Any>") }
1247+
}
1248+
1249+
impl<'a> Show for &'a any::Any {
1250+
fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") }
1251+
}
1252+
12451253
impl Show for TypeId {
12461254
fn fmt(&self, f: &mut Formatter) -> Result {
12471255
write!(f.buf, "TypeId \\{ {} \\}", self.hash())

trunk/src/libstd/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ extern crate core;
137137
#[cfg(not(test))] pub use ops = core::ops;
138138
#[cfg(not(test))] pub use ty = core::ty;
139139

140+
pub use core::any;
140141
pub use core::cast;
141142
pub use core::char;
142143
pub use core::container;
@@ -218,8 +219,6 @@ pub mod iter;
218219
pub mod to_str;
219220
pub mod clone;
220221
pub mod hash;
221-
pub mod default;
222-
pub mod any;
223222

224223
/* Common data structures */
225224

0 commit comments

Comments
 (0)