Skip to content

Commit 585742d

Browse files
committed
Remove unneeded code.
1 parent ee1d796 commit 585742d

File tree

2 files changed

+1
-69
lines changed

2 files changed

+1
-69
lines changed

clippy_lints/src/dereference.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::utils::{
2-
get_node_span, get_parent_node, in_macro, is_allowed, peel_mid_ty_refs, snippet_with_context, span_lint_and_sugg,
2+
get_parent_node, in_macro, is_allowed, peel_mid_ty_refs, snippet_with_context, span_lint_and_sugg,
33
};
44
use rustc_ast::util::parser::PREC_PREFIX;
55
use rustc_errors::Applicability;
@@ -102,11 +102,6 @@ impl<'tcx> LateLintPass<'tcx> for Dereferencing {
102102
match (self.state.take(), kind) {
103103
(None, kind) => {
104104
let parent = get_parent_node(cx.tcx, expr.hir_id);
105-
// This is an odd case. The expression is a macro argument, but the top level
106-
// address of expression is inserted by the compiler.
107-
if matches!(kind, RefOp::AddrOf) && parent.and_then(get_node_span).map_or(false, in_macro) {
108-
return;
109-
}
110105

111106
let expr_adjustments = find_adjustments(cx.tcx, typeck, expr);
112107
let expr_ty = typeck.expr_ty(expr);

clippy_lints/src/redundant_deref.rs

-63
This file was deleted.

0 commit comments

Comments
 (0)