Skip to content

Commit fac20d2

Browse files
committed
---
yaml --- r: 39864 b: refs/heads/incoming c: 5c0d674 h: refs/heads/master v: v3
1 parent 659b821 commit fac20d2

File tree

6 files changed

+43
-37
lines changed

6 files changed

+43
-37
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: e1f1a1204ad3a68a90490fcad69ab2c3e6be4086
9+
refs/heads/incoming: 5c0d674a45dca39d32e3b30af48e2faf718d43d7
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/trans/type_use.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ fn type_uses_for(ccx: @crate_ctxt, fn_id: def_id, n_tps: uint)
107107
ast_map::node_variant(_, _, _) => {
108108
for uint::range(0u, n_tps) |n| { cx.uses[n] |= use_repr;}
109109
}
110-
ast_map::node_foreign_item(i@@{node: foreign_item_fn(*), _},
110+
ast_map::node_foreign_item(i@@foreign_item { node: foreign_item_fn(*),
111+
_ },
111112
abi, _) => {
112113
if abi == foreign_abi_rust_intrinsic {
113114
let flags = match cx.ccx.sess.str_of(i.ident) {

branches/incoming/src/librustdoc/tystr_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn get_fn_sig(srv: astsrv::Srv, fn_id: doc::AstId) -> Option<~str> {
7272
ident: ident,
7373
node: ast::item_fn(decl, _, tys, _), _
7474
}, _) |
75-
ast_map::node_foreign_item(@{
75+
ast_map::node_foreign_item(@ast::foreign_item {
7676
ident: ident,
7777
node: ast::foreign_item_fn(decl, _, tys), _
7878
}, _, _) => {

branches/incoming/src/libsyntax/ast.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,13 +1574,14 @@ type struct_dtor_ = {id: node_id,
15741574

15751575
#[auto_encode]
15761576
#[auto_decode]
1577-
type foreign_item =
1578-
{ident: ident,
1579-
attrs: ~[attribute],
1580-
node: foreign_item_,
1581-
id: node_id,
1582-
span: span,
1583-
vis: visibility};
1577+
struct foreign_item {
1578+
ident: ident,
1579+
attrs: ~[attribute],
1580+
node: foreign_item_,
1581+
id: node_id,
1582+
span: span,
1583+
vis: visibility,
1584+
}
15841585

15851586
#[auto_encode]
15861587
#[auto_decode]

branches/incoming/src/libsyntax/fold.rs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,25 +178,29 @@ fn noop_fold_foreign_item(&&ni: @foreign_item, fld: ast_fold)
178178
let fold_arg = |x| fold_arg_(x, fld);
179179
let fold_attribute = |x| fold_attribute_(x, fld);
180180

181-
return @{ident: fld.fold_ident(ni.ident),
182-
attrs: vec::map(ni.attrs, |x| fold_attribute(*x)),
183-
node:
184-
match ni.node {
181+
@ast::foreign_item {
182+
ident: fld.fold_ident(ni.ident),
183+
attrs: vec::map(ni.attrs, |x| fold_attribute(*x)),
184+
node:
185+
match ni.node {
185186
foreign_item_fn(fdec, purity, typms) => {
186-
foreign_item_fn(
187-
{inputs: vec::map(fdec.inputs, |a| fold_arg(*a)),
188-
output: fld.fold_ty(fdec.output),
189-
cf: fdec.cf},
190-
purity,
191-
fold_ty_params(typms, fld))
187+
foreign_item_fn(
188+
{
189+
inputs: fdec.inputs.map(|a| fold_arg(*a)),
190+
output: fld.fold_ty(fdec.output),
191+
cf: fdec.cf,
192+
},
193+
purity,
194+
fold_ty_params(typms, fld))
192195
}
193196
foreign_item_const(t) => {
194-
foreign_item_const(fld.fold_ty(t))
197+
foreign_item_const(fld.fold_ty(t))
195198
}
196-
},
197-
id: fld.new_id(ni.id),
198-
span: fld.new_span(ni.span),
199-
vis: ni.vis};
199+
},
200+
id: fld.new_id(ni.id),
201+
span: fld.new_span(ni.span),
202+
vis: ni.vis,
203+
}
200204
}
201205

202206
fn noop_fold_item(&&i: @item, fld: ast_fold) -> Option<@item> {

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,12 +3123,12 @@ impl Parser {
31233123
let (decl, _) = self.parse_fn_decl(|p| p.parse_arg());
31243124
let mut hi = self.span.hi;
31253125
self.expect(token::SEMI);
3126-
return @{ident: t.ident,
3127-
attrs: attrs,
3128-
node: foreign_item_fn(decl, purity, t.tps),
3129-
id: self.get_id(),
3130-
span: mk_sp(lo, hi),
3131-
vis: vis};
3126+
@ast::foreign_item { ident: t.ident,
3127+
attrs: attrs,
3128+
node: foreign_item_fn(decl, purity, t.tps),
3129+
id: self.get_id(),
3130+
span: mk_sp(lo, hi),
3131+
vis: vis }
31323132
}
31333133
31343134
fn parse_item_foreign_const(vis: ast::visibility,
@@ -3140,12 +3140,12 @@ impl Parser {
31403140
let ty = self.parse_ty(false);
31413141
let hi = self.span.hi;
31423142
self.expect(token::SEMI);
3143-
return @{ident: ident,
3144-
attrs: attrs,
3145-
node: foreign_item_const(move ty),
3146-
id: self.get_id(),
3147-
span: mk_sp(lo, hi),
3148-
vis: vis};
3143+
@ast::foreign_item { ident: ident,
3144+
attrs: attrs,
3145+
node: foreign_item_const(ty),
3146+
id: self.get_id(),
3147+
span: mk_sp(lo, hi),
3148+
vis: vis }
31493149
}
31503150
31513151
fn parse_fn_purity() -> purity {

0 commit comments

Comments
 (0)