File tree Expand file tree Collapse file tree 5 files changed +11
-20
lines changed Expand file tree Collapse file tree 5 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 85a8e6b80ae91eb00a0bce96a5cec8017e1b37da
8
+ refs/heads/try2: 8ed728babb057c0f736a63a69ba772e45278148f
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change 21
21
//! the extension traits (`*Ext`) for the full details.
22
22
23
23
use cast:: { transmute, transmute_copy} ;
24
- use fmt;
25
24
use option:: { Option , Some , None } ;
26
25
use owned:: Box ;
27
26
use raw:: TraitObject ;
@@ -145,22 +144,6 @@ impl AnyOwnExt for Box<Any> {
145
144
}
146
145
}
147
146
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
-
164
147
#[ cfg( test) ]
165
148
mod tests {
166
149
use prelude:: * ;
Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ pub mod container;
37
37
38
38
/* Core types and methods on primitives */
39
39
40
+ pub mod any;
40
41
pub mod finally;
41
42
pub mod char;
Original file line number Diff line number Diff line change @@ -1242,6 +1242,14 @@ impl<T> Show for *mut T {
1242
1242
fn fmt ( & self , f : & mut Formatter ) -> Result { secret_pointer ( self , f) }
1243
1243
}
1244
1244
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
+
1245
1253
impl Show for TypeId {
1246
1254
fn fmt ( & self , f : & mut Formatter ) -> Result {
1247
1255
write ! ( f. buf, "TypeId \\ { {} \\ }" , self . hash( ) )
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ extern crate core;
137
137
#[ cfg( not( test) ) ] pub use ops = core:: ops;
138
138
#[ cfg( not( test) ) ] pub use ty = core:: ty;
139
139
140
+ pub use core:: any;
140
141
pub use core:: cast;
141
142
pub use core:: char;
142
143
pub use core:: container;
@@ -218,8 +219,6 @@ pub mod iter;
218
219
pub mod to_str;
219
220
pub mod clone;
220
221
pub mod hash;
221
- pub mod default;
222
- pub mod any;
223
222
224
223
/* Common data structures */
225
224
You can’t perform that action at this time.
0 commit comments