Skip to content

Commit

Permalink
Remove unneeded code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarcho committed Mar 9, 2021
1 parent ee1d796 commit 585742d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 69 deletions.
7 changes: 1 addition & 6 deletions clippy_lints/src/dereference.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::utils::{
get_node_span, get_parent_node, in_macro, is_allowed, peel_mid_ty_refs, snippet_with_context, span_lint_and_sugg,
get_parent_node, in_macro, is_allowed, peel_mid_ty_refs, snippet_with_context, span_lint_and_sugg,
};
use rustc_ast::util::parser::PREC_PREFIX;
use rustc_errors::Applicability;
Expand Down Expand Up @@ -102,11 +102,6 @@ impl<'tcx> LateLintPass<'tcx> for Dereferencing {
match (self.state.take(), kind) {
(None, kind) => {
let parent = get_parent_node(cx.tcx, expr.hir_id);
// This is an odd case. The expression is a macro argument, but the top level
// address of expression is inserted by the compiler.
if matches!(kind, RefOp::AddrOf) && parent.and_then(get_node_span).map_or(false, in_macro) {
return;
}

let expr_adjustments = find_adjustments(cx.tcx, typeck, expr);
let expr_ty = typeck.expr_ty(expr);
Expand Down
63 changes: 0 additions & 63 deletions clippy_lints/src/redundant_deref.rs

This file was deleted.

0 comments on commit 585742d

Please sign in to comment.