carry self ident forward through re-parsing

formerly, the self identifier was being discarded during parsing, which
stymies hygiene. The best fix here seems to be to attach a self identifier
to ExplicitSelf_, a change that rippled through the rest of the compiler,
but without any obvious damage.
This commit is contained in:
John Clements
2014-07-06 15:10:57 -07:00
parent 69c27546ee
commit 19e718b34d
15 changed files with 114 additions and 80 deletions

View File

@@ -334,9 +334,9 @@ pub trait Folder {
fn fold_explicit_self_(&mut self, es: &ExplicitSelf_) -> ExplicitSelf_ {
match *es {
SelfStatic | SelfValue | SelfUniq => *es,
SelfRegion(ref lifetime, m) => {
SelfRegion(fold_opt_lifetime(lifetime, self), m)
SelfStatic | SelfValue(_) | SelfUniq(_) => *es,
SelfRegion(ref lifetime, m, id) => {
SelfRegion(fold_opt_lifetime(lifetime, self), m, id)
}
}
}