Skip to content

Commit e7821ea

Browse files
committed
---
yaml --- r: 39871 b: refs/heads/incoming c: 0b9e231 h: refs/heads/master i: 39869: 10cec46 39867: 2cb4fe5 39863: 659b821 39855: 434c3e8 39839: e07944f 39807: 594ad2b v: v3
1 parent e32dd72 commit e7821ea

File tree

7 files changed

+24
-17
lines changed

7 files changed

+24
-17
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: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
9+
refs/heads/incoming: 0b9e23146b75c02dd9059dc754070884595f3104
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/librustc/front/core_inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn inject_libcore_ref(sess: Session,
6969
new_module = fld.fold_mod(new_module);
7070

7171
// XXX: Bad copy.
72-
let new_crate = { module: new_module, ..copy crate };
72+
let new_crate = ast::crate_ { module: new_module, ..copy crate };
7373
(new_crate, span)
7474
},
7575
fold_mod: |module, fld| {

branches/incoming/src/librustc/front/intrinsic_inject.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ fn inject_intrinsic(sess: Session, crate: @ast::crate) -> @ast::crate {
3737
let items = vec::append(~[item], crate.node.module.items);
3838

3939
@ast::spanned {
40-
node: { module: { items: items ,.. /*bad*/copy crate.node.module },
41-
.. /*bad*/copy crate.node},
40+
node: ast::crate_ {
41+
module: {
42+
items: items,
43+
.. /*bad*/copy crate.node.module
44+
},
45+
.. /*bad*/copy crate.node
46+
},
4247
.. /*bad*/copy *crate
4348
}
4449
}

branches/incoming/src/librustc/front/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ fn fold_crate(cx: test_ctxt, c: ast::crate_, fld: fold::ast_fold) ->
113113

114114
// Add a special __test module to the crate that will contain code
115115
// generated for the test harness
116-
return {module: add_test_module(cx, /*bad*/copy folded.module),.. folded};
116+
ast::crate_ { module: add_test_module(cx, /*bad*/copy folded.module),
117+
.. folded }
117118
}
118119

119120

branches/incoming/src/libsyntax/ast.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,11 @@ type crate_cfg = ~[@meta_item];
293293

294294
type crate = spanned<crate_>;
295295

296-
type crate_ =
297-
{module: _mod,
298-
attrs: ~[attribute],
299-
config: crate_cfg};
296+
struct crate_ {
297+
module: _mod,
298+
attrs: ~[attribute],
299+
config: crate_cfg,
300+
}
300301

301302
type meta_item = spanned<meta_item_>;
302303

branches/incoming/src/libsyntax/fold.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ fn noop_fold_crate(c: crate_, fld: ast_fold) -> crate_ {
165165
let fold_meta_item = |x| fold_meta_item_(x, fld);
166166
let fold_attribute = |x| fold_attribute_(x, fld);
167167

168-
return {
168+
crate_ {
169169
module: fld.fold_mod(c.module),
170-
attrs: vec::map(c.attrs, |x| fold_attribute(*x)),
171-
config: vec::map(c.config, |x| fold_meta_item(*x))
172-
};
170+
attrs: c.attrs.map(|x| fold_attribute(*x)),
171+
config: c.config.map(|x| fold_meta_item(*x)),
172+
}
173173
}
174174

175175
fn noop_fold_view_item(vi: view_item_, _fld: ast_fold) -> view_item_ {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3855,10 +3855,10 @@ impl Parser {
38553855
let crate_attrs = self.parse_inner_attrs_and_next();
38563856
let first_item_outer_attrs = crate_attrs.next;
38573857
let m = self.parse_mod_items(token::EOF, first_item_outer_attrs);
3858-
return @spanned(lo, self.span.lo,
3859-
{module: m,
3860-
attrs: crate_attrs.inner,
3861-
config: self.cfg});
3858+
@spanned(lo, self.span.lo,
3859+
ast::crate_ { module: m,
3860+
attrs: crate_attrs.inner,
3861+
config: self.cfg })
38623862
}
38633863
38643864
fn parse_str() -> @~str {

0 commit comments

Comments
 (0)