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:
parent
69c27546ee
commit
19e718b34d
15 changed files with 114 additions and 80 deletions
|
@ -191,6 +191,7 @@ use codemap;
|
|||
use codemap::Span;
|
||||
use owned_slice::OwnedSlice;
|
||||
use parse::token::InternedString;
|
||||
use parse::token::special_idents;
|
||||
|
||||
use self::ty::*;
|
||||
|
||||
|
@ -617,7 +618,8 @@ impl<'a> MethodDef<'a> {
|
|||
|
||||
let self_arg = match explicit_self.node {
|
||||
ast::SelfStatic => None,
|
||||
_ => Some(ast::Arg::new_self(trait_.span, ast::MutImmutable))
|
||||
// creating fresh self id
|
||||
_ => Some(ast::Arg::new_self(trait_.span, ast::MutImmutable, special_idents::self_))
|
||||
};
|
||||
let args = {
|
||||
let args = arg_types.move_iter().map(|(name, ty)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue