File tree 1 file changed +30
-1
lines changed 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ pub type crate_cfg = ~[@meta_item];
152
152
153
153
pub type crate = spanned<crate_>;
154
154
155
+ #[auto_encode]
156
+ #[auto_decode]
155
157
#[deriving_eq]
156
158
pub struct crate_ {
157
159
module: _mod,
@@ -1281,7 +1283,34 @@ pub enum inlined_item {
1281
1283
ii_dtor( struct_dtor, ident, ~[ ty_param] , def_id /* parent id */ )
1282
1284
}
1283
1285
1284
-
1286
+ #[ cfg( test) ]
1287
+ mod test {
1288
+ use std;
1289
+ use codemap:: * ;
1290
+ use super :: * ;
1291
+
1292
+ //are asts encodable?
1293
+
1294
+ // it looks like this *will* be a compiler bug, after
1295
+ // I get deriving_eq for crates into incoming :)
1296
+ /*
1297
+ #[test] fn check_asts_encodable() {
1298
+ let bogus_span = span {lo:BytePos(10),
1299
+ hi:BytePos(20),
1300
+ expn_info:None};
1301
+ let _e : crate =
1302
+ spanned{
1303
+ node: crate_{
1304
+ module: _mod {view_items: ~[], items: ~[]},
1305
+ attrs: ~[],
1306
+ config: ~[]
1307
+ },
1308
+ span: bogus_span};
1309
+ // doesn't matter which encoder we use....
1310
+ let _f = (_e as std::serialize::Encodable::<std::json::Encoder>);
1311
+ }
1312
+ */
1313
+ }
1285
1314
//
1286
1315
// Local Variables:
1287
1316
// mode: rust
You can’t perform that action at this time.
0 commit comments