about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer <github35764891676564198441@oli-obk.de>2018-10-14 22:55:26 +0200
committerGitHub <noreply@github.com>2018-10-14 22:55:26 +0200
commit212a4fe4f4aaa8e592f4e7178d9c9a7bcd8c97be (patch)
treed429f684cce6256b051f1fb9960d70eae518c004
parent1cb90cc48a2edf358be2eb5724eb6a26065e6673 (diff)
downloadrust-212a4fe4f4aaa8e592f4e7178d9c9a7bcd8c97be.tar.gz
rust-212a4fe4f4aaa8e592f4e7178d9c9a7bcd8c97be.zip
fix for rustc master
-rw-r--r--clippy_lints/src/len_zero.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs
index defb5892e51..1dd775051d9 100644
--- a/clippy_lints/src/len_zero.rs
+++ b/clippy_lints/src/len_zero.rs
@@ -276,7 +276,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
     let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
     match ty.sty {
         ty::Dynamic(ref tt, ..) => cx.tcx
-            .associated_items(tt.principal().expect("trait impl not found").def_id())
+            .associated_items(tt.principal().def_id())
             .any(|item| is_is_empty(cx, &item)),
         ty::Projection(ref proj) => has_is_empty_impl(cx, proj.item_def_id),
         ty::Adt(id, _) => has_is_empty_impl(cx, id.did),