about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-10-14 15:57:23 -0700
committerGitHub <noreply@github.com>2018-10-14 15:57:23 -0700
commit5afdf8b78507ddf015d192858aef56e72c17de16 (patch)
treed429f684cce6256b051f1fb9960d70eae518c004
parent1cb90cc48a2edf358be2eb5724eb6a26065e6673 (diff)
parent212a4fe4f4aaa8e592f4e7178d9c9a7bcd8c97be (diff)
downloadrust-5afdf8b78507ddf015d192858aef56e72c17de16.tar.gz
rust-5afdf8b78507ddf015d192858aef56e72c17de16.zip
Merge pull request #3315 from rust-lang-nursery/oli-obk-patch-1
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),