@@ -79,7 +79,7 @@ import std::map::str_hash;
79
79
80
80
type self_info = {
81
81
self_ty : ty:: t ,
82
- node_id : ast:: node_id ,
82
+ def_id : ast:: def_id ,
83
83
explicit_self : ast:: self_ty_
84
84
} ;
85
85
@@ -401,7 +401,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
401
401
let self_ty = ty:: node_id_to_type ( tcx, id) ;
402
402
403
403
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) ,
405
406
explicit_self: ast:: sty_by_ref} ;
406
407
// typecheck the ctor
407
408
check_bare_fn ( ccx, ctor. node . dec ,
@@ -412,7 +413,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
412
413
}
413
414
414
415
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) ,
416
418
explicit_self: ast:: sty_by_ref} ;
417
419
// typecheck the dtor
418
420
check_bare_fn ( ccx, ast_util:: dtor_dec ( ) ,
@@ -424,7 +426,8 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
424
426
425
427
// typecheck the methods
426
428
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) ,
428
431
explicit_self: m. self_ty. node} ) ;
429
432
}
430
433
// Check that there's at least one field
@@ -450,7 +453,8 @@ fn check_item(ccx: @crate_ctxt, it: @ast::item) {
450
453
* it. ident, it. id, rp} ;
451
454
let self_ty = ccx. to_ty( rscope:: type_rscope( rp) , ty) ;
452
455
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) ,
454
458
explicit_self: m. self_ty. node } ;
455
459
check_method( ccx, m, self_info)
456
460
}
@@ -464,7 +468,7 @@ fn check_item(ccx: @crate_ctxt, it: @ast::item) {
464
468
}
465
469
provided( m) => {
466
470
let self_info = { self_ty: ty:: mk_self( ccx. tcx) ,
467
- node_id : it. id,
471
+ def_id : local_def ( it. id) ,
468
472
explicit_self: m. self_ty. node} ;
469
473
check_method( ccx, m, self_info) ;
470
474
}
0 commit comments