Skip to content

Commit f3eda4b

Browse files
committed
---
yaml --- r: 47623 b: refs/heads/incoming c: 9d962d8 h: refs/heads/master i: 47621: eef692c 47619: c82b8ac 47615: 841a37f v: v3
1 parent 5d0f58f commit f3eda4b

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: ded95d2c2891d7ffec1277cb4969ed956ff0bd25
9+
refs/heads/incoming: 9d962d84669a02805571683707cec712415af4c6
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libsyntax/ast.rs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ pub type crate_cfg = ~[@meta_item];
152152
153153
pub type crate = spanned<crate_>;
154154
155+
#[auto_encode]
156+
#[auto_decode]
155157
#[deriving_eq]
156158
pub struct crate_ {
157159
module: _mod,
@@ -1281,7 +1283,34 @@ pub enum inlined_item {
12811283
ii_dtor(struct_dtor, ident, ~[ty_param], def_id /* parent id */)
12821284
}
12831285

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+
}
12851314
//
12861315
// Local Variables:
12871316
// mode: rust

0 commit comments

Comments
 (0)