Refactor how impl self types are stored
In order to avoid a confusing use of the tcache, I added an extra node ID field to trait refs. Now trait refs have a "ref ID" (the one that resolve3 resolves) and an "impl ID" (the one that you look up in the tcache to get the self type). Closes #2434
This commit is contained in:
parent
ee73b78e04
commit
07a81ad12e
10 changed files with 41 additions and 31 deletions
|
@ -287,7 +287,8 @@ fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
|
|||
}
|
||||
|
||||
fn fold_trait_ref(&&p: @trait_ref, fld: ast_fold) -> @trait_ref {
|
||||
@{path: fld.fold_path(p.path), id: fld.new_id(p.id)}
|
||||
@{path: fld.fold_path(p.path), ref_id: fld.new_id(p.ref_id),
|
||||
impl_id: fld.new_id(p.impl_id)}
|
||||
}
|
||||
|
||||
fn noop_fold_method(&&m: @method, fld: ast_fold) -> @method {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue