diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-06-26 16:25:52 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-07-13 14:47:04 -0700 |
| commit | 07a81ad12e5cb7f84138af6624f30c5dbb75512f (patch) | |
| tree | 919cac823330022fbbf5bc5130c29901278ab22f /src/libsyntax/parse/parser.rs | |
| parent | ee73b78e04860f0e4312e462c80ab8a6d37cd759 (diff) | |
| download | rust-07a81ad12e5cb7f84138af6624f30c5dbb75512f.tar.gz rust-07a81ad12e5cb7f84138af6624f30c5dbb75512f.zip | |
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
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 5a1eb7636ba..7448f246698 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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] { |
