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

@@ -1967,13 +1967,13 @@ impl<'a> State<'a> {
try!(self.print_mutability(mutbl));
match explicit_self {
ast::SelfStatic => { return Ok(false); }
ast::SelfValue => {
ast::SelfValue(_) => {
try!(word(&mut self.s, "self"));
}
ast::SelfUniq => {
ast::SelfUniq(_) => {
try!(word(&mut self.s, "~self"));
}
ast::SelfRegion(ref lt, m) => {
ast::SelfRegion(ref lt, m, _) => {
try!(word(&mut self.s, "&"));
try!(self.print_opt_lifetime(lt));
try!(self.print_mutability(m));