]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/hir_utils.rs
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / clippy_utils / src / hir_utils.rs
index 7b5c5af8f79bfb1d761e92db4597a77443ea0160..9654895060f85bde17984d509fb4fc2f0906adf4 100644 (file)
@@ -1,5 +1,4 @@
 use crate::consts::{constant_context, constant_simple};
-use crate::differing_macro_contexts;
 use crate::source::snippet_opt;
 use rustc_ast::ast::InlineAsmTemplatePiece;
 use rustc_data_structures::fx::FxHasher;
@@ -186,7 +185,7 @@ pub fn eq_body(&mut self, left: BodyId, right: BodyId) -> bool {
 
     #[allow(clippy::similar_names)]
     pub fn eq_expr(&mut self, left: &Expr<'_>, right: &Expr<'_>) -> bool {
-        if !self.inner.allow_side_effects && differing_macro_contexts(left.span, right.span) {
+        if !self.inner.allow_side_effects && left.span.ctxt() != right.span.ctxt() {
             return false;
         }