Skip to content

Commit e5f64ea

Browse files
committed
---
yaml --- r: 27874 b: refs/heads/try c: 3a5c7f5 h: refs/heads/master v: v3
1 parent d305807 commit e5f64ea

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 3ab4b014cfaf6dff5b450f4a1772e9993550fe38
5+
refs/heads/try: 3a5c7f52cc089214c936f409b3f97d6bda377d84
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/src/rustc/middle/typeck/check.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import std::map::str_hash;
7979

8080
type self_info = {
8181
self_ty: ty::t,
82-
node_id: ast::node_id,
82+
def_id: ast::def_id,
8383
explicit_self: ast::self_ty_
8484
};
8585

@@ -401,7 +401,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
401401
let self_ty = ty::node_id_to_type(tcx, id);
402402

403403
do option::iter(struct_def.ctor) |ctor| {
404-
let class_t = {self_ty: self_ty, node_id: id,
404+
let class_t = {self_ty: self_ty,
405+
def_id: local_def(id),
405406
explicit_self: ast::sty_by_ref};
406407
// typecheck the ctor
407408
check_bare_fn(ccx, ctor.node.dec,
@@ -412,7 +413,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
412413
}
413414

414415
do option::iter(struct_def.dtor) |dtor| {
415-
let class_t = {self_ty: self_ty, node_id: id,
416+
let class_t = {self_ty: self_ty,
417+
def_id: local_def(id),
416418
explicit_self: ast::sty_by_ref};
417419
// typecheck the dtor
418420
check_bare_fn(ccx, ast_util::dtor_dec(),
@@ -424,7 +426,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
424426

425427
// typecheck the methods
426428
for struct_def.methods.each |m| {
427-
check_method(ccx, m, {self_ty: self_ty, node_id: id,
429+
check_method(ccx, m, {self_ty: self_ty,
430+
def_id: local_def(id),
428431
explicit_self: m.self_ty.node});
429432
}
430433
// Check that there's at least one field
@@ -450,7 +453,8 @@ fn check_item(ccx: @crate_ctxt, it: @ast::item) {
450453
*it.ident, it.id, rp};
451454
let self_ty = ccx.to_ty(rscope::type_rscope(rp), ty);
452455
for ms.each |m| {
453-
let self_info = {self_ty: self_ty, node_id: it.id,
456+
let self_info = {self_ty: self_ty,
457+
def_id: local_def(it.id),
454458
explicit_self: m.self_ty.node };
455459
check_method(ccx, m, self_info)
456460
}
@@ -464,7 +468,7 @@ fn check_item(ccx: @crate_ctxt, it: @ast::item) {
464468
}
465469
provided(m) => {
466470
let self_info = {self_ty: ty::mk_self(ccx.tcx),
467-
node_id: it.id,
471+
def_id: local_def(it.id),
468472
explicit_self: m.self_ty.node};
469473
check_method(ccx, m, self_info);
470474
}

branches/try/src/rustc/middle/typeck/check/regionmanip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn replace_bound_regions_in_fn_ty(
5858
ty_to_str(tcx, t_fn)};
5959

6060

61-
// Glue updated self_ty back together with its original node_id.
61+
// Glue updated self_ty back together with its original def_id.
6262
let new_self_info = match self_info {
6363
some(s) => match check t_self {
6464
some(t) => some({self_ty: t with s})

0 commit comments

Comments
 (0)