1
Fork 0

Instead of renaming, treat differently marked identifiers as unequal

This commit is contained in:
Jeffrey Seyfried 2016-06-22 02:50:05 +00:00
parent ca924047de
commit a15dfca54f
6 changed files with 37 additions and 560 deletions

View file

@ -15,7 +15,6 @@ pub use self::Lit::*;
pub use self::Token::*;
use ast::{self, BinOpKind};
use ext::mtwt;
use ptr::P;
use util::interner::{RcStr, StrInterner};
use util::interner;
@ -313,17 +312,6 @@ impl Token {
_ => false,
}
}
/// Hygienic identifier equality comparison.
///
/// See `styntax::ext::mtwt`.
pub fn mtwt_eq(&self, other : &Token) -> bool {
match (self, other) {
(&Ident(id1), &Ident(id2)) | (&Lifetime(id1), &Lifetime(id2)) =>
mtwt::resolve(id1) == mtwt::resolve(id2),
_ => *self == *other
}
}
}
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash)]