Explicitly store self_ids use for self locals in methods

This makes it possible to move them between crates without confusion,
and to instantiate them at a point where the monomorphizing
substitutions are known.

Issue #1944
This commit is contained in:
Marijn Haverbeke 2012-03-07 12:54:00 +01:00
parent fd465f91a8
commit c71306b0db
14 changed files with 62 additions and 42 deletions

View file

@ -191,10 +191,13 @@ fn visit_ids(item: ast::inlined_item, vfn: fn@(ast::node_id)) {
alt fk {
visit::fk_item_fn(_, tps) |
visit::fk_method(_, tps) |
visit::fk_res(_, tps) {
vec::iter(tps) {|tp| vfn(tp.id)}
}
visit::fk_method(_, tps, m) {
vfn(m.self_id);
vec::iter(tps) {|tp| vfn(tp.id)}
}
visit::fk_anon(_) |
visit::fk_fn_block {
}