Skip to content

Commit 7f31a6f

Browse files
committed
---
yaml --- r: 39865 b: refs/heads/incoming c: ebea895 h: refs/heads/master i: 39863: 659b821 v: v3
1 parent fac20d2 commit 7f31a6f

File tree

6 files changed

+44
-31
lines changed

6 files changed

+44
-31
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 5c0d674a45dca39d32e3b30af48e2faf718d43d7
9+
refs/heads/incoming: ebea895d026722e5887bd6544639152b87a80cc5
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/librustc/middle/astencode.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,12 @@ fn simplify_ast(ii: ast::inlined_item) -> ast::inlined_item {
288288
}
289289
ast::ii_dtor(ref dtor, nm, ref tps, parent_id) => {
290290
let dtor_body = fld.fold_block((*dtor).node.body);
291-
ast::ii_dtor(ast::spanned { node: { body: dtor_body,
292-
.. /*bad*/copy (*dtor).node },
293-
.. (/*bad*/copy *dtor) },
294-
nm, /*bad*/copy *tps, parent_id)
291+
ast::ii_dtor(
292+
ast::spanned {
293+
node: ast::struct_dtor_ { body: dtor_body,
294+
.. /*bad*/copy (*dtor).node },
295+
.. (/*bad*/copy *dtor) },
296+
nm, /*bad*/copy *tps, parent_id)
295297
}
296298
}
297299
}
@@ -327,12 +329,15 @@ fn renumber_ast(xcx: extended_decode_ctxt, ii: ast::inlined_item)
327329
let dtor_id = fld.new_id((*dtor).node.id);
328330
let new_parent = xcx.tr_def_id(parent_id);
329331
let new_self = fld.new_id((*dtor).node.self_id);
330-
ast::ii_dtor(ast::spanned { node: { id: dtor_id,
331-
attrs: dtor_attrs,
332-
self_id: new_self,
333-
body: dtor_body },
334-
.. (/*bad*/copy *dtor)},
335-
nm, new_params, new_parent)
332+
ast::ii_dtor(
333+
ast::spanned {
334+
node: ast::struct_dtor_ { id: dtor_id,
335+
attrs: dtor_attrs,
336+
self_id: new_self,
337+
body: dtor_body },
338+
.. (/*bad*/copy *dtor)
339+
},
340+
nm, new_params, new_parent)
336341
}
337342
}
338343
}

branches/incoming/src/libsyntax/ast.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,10 +1567,12 @@ type struct_dtor = spanned<struct_dtor_>;
15671567

15681568
#[auto_encode]
15691569
#[auto_decode]
1570-
type struct_dtor_ = {id: node_id,
1571-
attrs: ~[attribute],
1572-
self_id: node_id,
1573-
body: blk};
1570+
struct struct_dtor_ {
1571+
id: node_id,
1572+
attrs: ~[attribute],
1573+
self_id: node_id,
1574+
body: blk,
1575+
}
15741576

15751577
#[auto_encode]
15761578
#[auto_decode]

branches/incoming/src/libsyntax/ast_map.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,12 @@ fn map_fn(fk: visit::fn_kind, decl: fn_decl, body: blk,
185185
match fk {
186186
visit::fk_dtor(tps, ref attrs, self_id, parent_id) => {
187187
let dt = @spanned {
188-
node: {id: id, attrs: (*attrs), self_id: self_id,
189-
body: /* FIXME (#2543) */ copy body},
188+
node: ast::struct_dtor_ {
189+
id: id,
190+
attrs: (*attrs),
191+
self_id: self_id,
192+
body: /* FIXME (#2543) */ copy body,
193+
},
190194
span: sp,
191195
};
192196
cx.map.insert(id, node_dtor(/* FIXME (#2543) */ copy tps, dt,

branches/incoming/src/libsyntax/fold.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,9 @@ fn fold_struct_def(struct_def: @ast::struct_def, fld: ast_fold)
276276
let dtor = do option::map(&struct_def.dtor) |dtor| {
277277
let dtor_body = fld.fold_block(dtor.node.body);
278278
let dtor_id = fld.new_id(dtor.node.id);
279-
spanned { node: { body: dtor_body,
280-
id: dtor_id, .. dtor.node},
279+
spanned { node: ast::struct_dtor_ { body: dtor_body,
280+
id: dtor_id,
281+
.. dtor.node},
281282
span: dtor.span }
282283
};
283284
return @{
@@ -576,8 +577,9 @@ fn noop_fold_variant(v: variant_, fld: ast_fold) -> variant_ {
576577
let dtor = do option::map(&struct_def.dtor) |dtor| {
577578
let dtor_body = fld.fold_block(dtor.node.body);
578579
let dtor_id = fld.new_id(dtor.node.id);
579-
spanned { node: { body: dtor_body,
580-
id: dtor_id, .. dtor.node},
580+
spanned { node: ast::struct_dtor_ { body: dtor_body,
581+
id: dtor_id,
582+
.. dtor.node},
581583
.. *dtor }
582584
};
583585
kind = struct_variant_kind(@{

branches/incoming/src/libsyntax/parse/parser.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2836,16 +2836,16 @@ impl Parser {
28362836

28372837
let actual_dtor = do the_dtor.map |dtor| {
28382838
let (d_body, d_attrs, d_s) = *dtor;
2839-
spanned { node: { id: self.get_id(),
2840-
attrs: d_attrs,
2841-
self_id: self.get_id(),
2842-
body: d_body},
2839+
spanned { node: ast::struct_dtor_ { id: self.get_id(),
2840+
attrs: d_attrs,
2841+
self_id: self.get_id(),
2842+
body: d_body},
28432843
span: d_s}};
28442844
let _ = self.get_id(); // XXX: Workaround for crazy bug.
28452845
let new_id = self.get_id();
28462846
(class_name,
28472847
item_struct(@{
2848-
fields: move fields,
2848+
fields: fields,
28492849
dtor: actual_dtor,
28502850
ctor_id: if is_tuple_like { Some(new_id) } else { None }
28512851
}, ty_params),
@@ -3333,15 +3333,15 @@ impl Parser {
33333333
self.bump();
33343334
let mut actual_dtor = do the_dtor.map |dtor| {
33353335
let (d_body, d_attrs, d_s) = *dtor;
3336-
spanned { node: { id: self.get_id(),
3337-
attrs: d_attrs,
3338-
self_id: self.get_id(),
3339-
body: d_body },
3336+
spanned { node: ast::struct_dtor_ { id: self.get_id(),
3337+
attrs: d_attrs,
3338+
self_id: self.get_id(),
3339+
body: d_body },
33403340
span: d_s }
33413341
};
33423342
33433343
return @{
3344-
fields: move fields,
3344+
fields: fields,
33453345
dtor: actual_dtor,
33463346
ctor_id: None
33473347
};

0 commit comments

Comments
 (0)