Skip to content

Commit 8061df7

Browse files
committed
---
yaml --- r: 11615 b: refs/heads/master c: e2fa6f0 h: refs/heads/master i: 11613: 7e2934b 11611: ed6e1ef 11607: 72844a3 11599: 3c42cc6 11583: 34fa844 v: v3
1 parent 5bd4869 commit 8061df7

File tree

19 files changed

+494
-233
lines changed

19 files changed

+494
-233
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 1d826b735c30a89bfe3aac8acbcda4efc8b5286f
2+
refs/heads/master: e2fa6f03f5b3195b2f81e259a6b946567440b576
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/metadata/astencode_gen.rs

Lines changed: 179 additions & 125 deletions
Large diffs are not rendered by default.

trunk/src/rustc/metadata/encoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn encode_module_item_paths(ebml_w: ebml::writer, module: _mod, path: [str],
127127
encode_def_id(ebml_w, local_def(it.id));
128128
ebml_w.end_tag();
129129
}
130-
item_class(_,_,_,_,_) {
130+
item_class(_,_,_) {
131131
fail "encode: implement item_class";
132132
}
133133
item_enum(variants, tps) {
@@ -384,7 +384,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
384384
encode_enum_variant_info(ecx, ebml_w, item.id, variants,
385385
path, index, tps);
386386
}
387-
item_class(_,_,_,_,_) {
387+
item_class(_,_,_) {
388388
fail "encode: implement item_class";
389389
}
390390
item_res(_, tps, _, _, ctor_id) {

trunk/src/rustc/middle/resolve.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,12 @@ fn visit_item_with_scope(e: @env, i: @ast::item, sc: scopes, v: vt<scopes>) {
541541
v.visit_ty(m.decl.output, msc, v);
542542
}
543543
}
544-
ast::item_class(tps, members, ctor_id, ctor_decl, ctor_block) {
544+
ast::item_class(tps, members, ctor) {
545545
visit::visit_ty_params(tps, sc, v);
546546
let class_scope = cons(scope_item(i), @sc);
547547
/* visit the constructor... */
548-
visit_fn_with_scope(e, visit::fk_item_fn(i.ident, tps), ctor_decl,
549-
ctor_block, ctor_block.span, ctor_id,
548+
visit_fn_with_scope(e, visit::fk_item_fn(i.ident, tps), ctor.node.dec,
549+
ctor.node.body, ctor.span, ctor.node.id,
550550
class_scope, v);
551551
/* visit the items */
552552
for cm in members {
@@ -1029,12 +1029,12 @@ fn lookup_in_scope(e: env, sc: scopes, sp: span, name: ident, ns: namespace)
10291029
ast::item_native_mod(m) {
10301030
ret lookup_in_local_native_mod(e, it.id, sp, name, ns);
10311031
}
1032-
ast::item_class(tps, members, ctor_id, _, _) {
1032+
ast::item_class(tps, members, ctor) {
10331033
if ns == ns_type {
10341034
ret lookup_in_ty_params(e, name, tps);
10351035
}
10361036
if ns == ns_val(value_or_enum) && name == it.ident {
1037-
ret some(ast::def_fn(local_def(ctor_id),
1037+
ret some(ast::def_fn(local_def(ctor.node.id),
10381038
ast::impure_fn));
10391039
}
10401040
if ns == ns_val(value_or_enum) {
@@ -1359,7 +1359,7 @@ fn found_def_item(i: @ast::item, ns: namespace) -> option<def> {
13591359
_ { }
13601360
}
13611361
}
1362-
ast::item_class(_, _, _, _, _) {
1362+
ast::item_class(_, _, _) {
13631363
if ns == ns_type {
13641364
ret some(ast::def_class(local_def(i.id)));
13651365
}
@@ -1664,16 +1664,16 @@ fn index_mod(md: ast::_mod) -> mod_index {
16641664
variant_idx += 1u;
16651665
}
16661666
}
1667-
ast::item_class(tps, items, ctor_id, ctor_decl, ctor_body) {
1667+
ast::item_class(tps, items, ctor) {
16681668
// add the class name itself
16691669
add_to_index(index, it.ident, mie_item(it));
16701670
// add the constructor decl
16711671
add_to_index(index, it.ident,
16721672
mie_item(@{ident: it.ident, attrs: [],
1673-
id: ctor_id,
1674-
node:
1675-
item_fn(ctor_decl, tps, ctor_body),
1676-
span: ctor_body.span}));
1673+
id: ctor.node.id,
1674+
node:
1675+
item_fn(ctor.node.dec, tps, ctor.node.body),
1676+
span: ctor.node.body.span}));
16771677
// add the members
16781678
for ci in items {
16791679
add_to_index(index, class_item_ident(ci),

0 commit comments

Comments
 (0)