about summary refs log tree commit diff
path: root/clippy_utils/src/sugg.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2023-03-24 14:04:35 +0100
committerPhilipp Krones <hello@philkrones.com>2023-03-24 14:26:19 +0100
commit8df896c076fd993bad58878ee8a6ed29d8e586ba (patch)
treec0edd67687a954bb38d66e77dae3dbd0db3909c5 /clippy_utils/src/sugg.rs
parent58eb9964cc627470cdd9fdcdef872a45615227fe (diff)
downloadrust-8df896c076fd993bad58878ee8a6ed29d8e586ba.tar.gz
rust-8df896c076fd993bad58878ee8a6ed29d8e586ba.zip
Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyup
Diffstat (limited to 'clippy_utils/src/sugg.rs')
-rw-r--r--clippy_utils/src/sugg.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs
index 44cb5d5756a..a5a4a921d94 100644
--- a/clippy_utils/src/sugg.rs
+++ b/clippy_utils/src/sugg.rs
@@ -1,9 +1,7 @@
 //! Contains utility functions to generate suggestions.
 #![deny(clippy::missing_docs_in_private_items)]
 
-use crate::source::{
-    snippet, snippet_opt, snippet_with_applicability, snippet_with_context, snippet_with_macro_callsite,
-};
+use crate::source::{snippet, snippet_opt, snippet_with_applicability, snippet_with_context};
 use crate::ty::expr_sig;
 use crate::{get_parent_expr_for_hir, higher};
 use rustc_ast::util::parser::AssocOp;
@@ -89,12 +87,6 @@ impl<'a> Sugg<'a> {
         })
     }
 
-    /// Same as `hir`, but will use the pre expansion span if the `expr` was in a macro.
-    pub fn hir_with_macro_callsite(cx: &LateContext<'_>, expr: &hir::Expr<'_>, default: &'a str) -> Self {
-        let get_snippet = |span| snippet_with_macro_callsite(cx, span, default);
-        Self::hir_from_snippet(expr, get_snippet)
-    }
-
     /// Same as `hir`, but first walks the span up to the given context. This will result in the
     /// macro call, rather then the expansion, if the span is from a child context. If the span is
     /// not from a child context, it will be used directly instead.