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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user