]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/identity_conversion.rs
Auto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq
[rust.git] / clippy_lints / src / identity_conversion.rs
index baf7791b79210d30dc246044709d64a08addc3c8..2441dd914affeeff8081c5919820d6f213473ca5 100644 (file)
@@ -1,6 +1,5 @@
 use crate::utils::{
-    in_macro_or_desugar, match_def_path, match_trait_method, same_tys, snippet, snippet_with_macro_callsite,
-    span_lint_and_then,
+    match_def_path, match_trait_method, same_tys, snippet, snippet_with_macro_callsite, span_lint_and_then,
 };
 use crate::utils::{paths, resolve_node};
 use rustc::hir::*;
@@ -34,7 +33,7 @@ pub struct IdentityConversion {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityConversion {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
-        if in_macro_or_desugar(e.span) {
+        if e.span.from_expansion() {
             return;
         }