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:
@@ -2189,7 +2189,7 @@ class parser {
|
||||
if option::is_none(ident) {
|
||||
ident = some(vec::last(path.idents));
|
||||
}
|
||||
some(@{path: path, id: self.get_id()})
|
||||
some(@{path: path, ref_id: self.get_id(), impl_id: self.get_id()})
|
||||
} else { none };
|
||||
let ident = alt ident {
|
||||
some(name) { name }
|
||||
@@ -2223,7 +2223,7 @@ class parser {
|
||||
|
||||
fn parse_trait_ref() -> @trait_ref {
|
||||
@{path: self.parse_path_with_tps(false),
|
||||
id: self.get_id()}
|
||||
ref_id: self.get_id(), impl_id: self.get_id()}
|
||||
}
|
||||
|
||||
fn parse_trait_ref_list() -> ~[@trait_ref] {
|
||||
|
||||
Reference in New Issue
Block a user