Use Span::eq_ctxt
method instead of .ctxt() == .ctxt()
This commit is contained in:
parent
2c3bb42ebd
commit
52c9906c4b
7 changed files with 12 additions and 9 deletions
|
@ -537,6 +537,9 @@ impl Span {
|
|||
pub fn ctxt(self) -> SyntaxContext {
|
||||
self.data_untracked().ctxt
|
||||
}
|
||||
pub fn eq_ctxt(self, other: Span) -> bool {
|
||||
self.data_untracked().ctxt == other.data_untracked().ctxt
|
||||
}
|
||||
#[inline]
|
||||
pub fn with_ctxt(self, ctxt: SyntaxContext) -> Span {
|
||||
self.data_untracked().with_ctxt(ctxt)
|
||||
|
|
|
@ -1641,7 +1641,7 @@ impl Ident {
|
|||
|
||||
impl PartialEq for Ident {
|
||||
fn eq(&self, rhs: &Self) -> bool {
|
||||
self.name == rhs.name && self.span.ctxt() == rhs.span.ctxt()
|
||||
self.name == rhs.name && self.span.eq_ctxt(rhs.span)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue