about summary refs log tree commit diff
path: root/clippy_lints/src/len_zero.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-25 06:23:55 +0000
committerbors <bors@rust-lang.org>2020-09-25 06:23:55 +0000
commit6273be6fc26b22f91389a67a30c6633d60cc459d (patch)
tree882bb8c78e662a6130049429d513d3556e299369 /clippy_lints/src/len_zero.rs
parenta8c60732786626928fe9dceb1ffe0775a2700969 (diff)
parentd1f9cad102b5686f2b827f3c62a02dfe419128a6 (diff)
Auto merge of #77144 - flip1995:clippyup, r=Manishearth
Update Clippy

Bi-weekly Clippy update.

This includes a `Cargo.lock` update (d445493479711389f4dea3a0f433041077ba2088), so probably needs `rollup=never`.

r? `@Manishearth`
Diffstat (limited to 'clippy_lints/src/len_zero.rs')
-rw-r--r--clippy_lints/src/len_zero.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs
index 42a98dc963d..c9c4891bb08 100644
--- a/clippy_lints/src/len_zero.rs
+++ b/clippy_lints/src/len_zero.rs
@@ -1,4 +1,4 @@
-use crate::utils::{get_item_name, snippet_with_applicability, span_lint, span_lint_and_sugg, walk_ptrs_ty};
+use crate::utils::{get_item_name, snippet_with_applicability, span_lint, span_lint_and_sugg};
 use rustc_ast::ast::LitKind;
 use rustc_data_structures::fx::FxHashSet;
 use rustc_errors::Applicability;
@@ -285,7 +285,7 @@ fn has_is_empty(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
         })
     }
 
-    let ty = &walk_ptrs_ty(cx.typeck_results().expr_ty(expr));
+    let ty = &cx.typeck_results().expr_ty(expr).peel_refs();
     match ty.kind() {
         ty::Dynamic(ref tt, ..) => tt.principal().map_or(false, |principal| {
             cx.tcx