Skip to content

Commit e1c517c

Browse files
committed
migrate libsyntax/rustc to auto_serialize2
1 parent 2a41abb commit e1c517c

File tree

12 files changed

+503
-443
lines changed

12 files changed

+503
-443
lines changed

src/libsyntax/ast.rs

Lines changed: 208 additions & 147 deletions
Large diffs are not rendered by default.

src/libsyntax/ast_util.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ fn dtor_dec() -> fn_decl {
406406
// ______________________________________________________________________
407407
// Enumerating the IDs which appear in an AST
408408

409-
#[auto_serialize]
409+
#[auto_serialize2]
410+
#[auto_deserialize2]
410411
type id_range = {min: node_id, max: node_id};
411412

412413
fn empty(range: id_range) -> bool {

src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum syntax_extension {
5454
// macro_defining() is obsolete, remove when #old_macros go away.
5555
macro_defining(macro_definer),
5656

57-
// #[auto_serialize] and such. will probably survive death of #old_macros
57+
// #[auto_serialize2] and such. will probably survive death of #old_macros
5858
item_decorator(item_decorator),
5959

6060
// Token-tree expanders

src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn expand_expr(exts: HashMap<~str, syntax_extension>, cx: ext_ctxt,
124124
}
125125

126126
// This is a secondary mechanism for invoking syntax extensions on items:
127-
// "decorator" attributes, such as #[auto_serialize]. These are invoked by an
127+
// "decorator" attributes, such as #[auto_serialize2]. These are invoked by an
128128
// attribute prefixing an item, and are interpreted by feeding the item
129129
// through the named attribute _as a syntax extension_ and splicing in the
130130
// resulting item vec into place in favour of the decorator. Note that

src/libsyntax/parse/token.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
use util::interner;
22
use util::interner::interner;
33
use std::map::HashMap;
4-
use std::serialization::{Serializer,
5-
Deserializer,
6-
serialize_uint,
7-
deserialize_uint,
8-
serialize_i64,
9-
deserialize_i64,
10-
serialize_u64,
11-
deserialize_u64,
12-
serialize_bool,
13-
deserialize_bool};
14-
15-
#[auto_serialize]
4+
5+
#[auto_serialize2]
6+
#[auto_deserialize2]
167
enum binop {
178
PLUS,
189
MINUS,
@@ -26,7 +17,8 @@ enum binop {
2617
SHR,
2718
}
2819

29-
#[auto_serialize]
20+
#[auto_serialize2]
21+
#[auto_deserialize2]
3022
enum token {
3123
/* Expression-operator symbols. */
3224
EQ,
@@ -83,7 +75,8 @@ enum token {
8375
EOF,
8476
}
8577

86-
#[auto_serialize]
78+
#[auto_serialize2]
79+
#[auto_deserialize2]
8780
/// For interpolation during macro expansion.
8881
enum nonterminal {
8982
nt_item(@ast::item),

src/rustc/metadata/csearch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Searching for information from the cstore
22

3-
use std::{ebml};
3+
use std::ebml2;
44
use syntax::ast;
55
use syntax::ast_util;
66
use syntax::ast_map;
@@ -136,7 +136,7 @@ fn get_field_type(tcx: ty::ctxt, class_id: ast::def_id,
136136
def: ast::def_id) -> ty::ty_param_bounds_and_ty {
137137
let cstore = tcx.cstore;
138138
let cdata = cstore::get_crate_data(cstore, class_id.crate);
139-
let all_items = ebml::get_doc(ebml::Doc(cdata.data), tag_items);
139+
let all_items = ebml2::get_doc(ebml2::Doc(cdata.data), tag_items);
140140
debug!("Looking up %?", class_id);
141141
let class_doc = expect(tcx.diag,
142142
decoder::maybe_find_item(class_id.node, all_items),

0 commit comments

Comments
 (0)