Skip to content

Commit 212a4fe

Browse files
authored
fix for rustc master
1 parent 1cb90cc commit 212a4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/len_zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
276276
let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
277277
match ty.sty {
278278
ty::Dynamic(ref tt, ..) => cx.tcx
279-
.associated_items(tt.principal().expect("trait impl not found").def_id())
279+
.associated_items(tt.principal().def_id())
280280
.any(|item| is_is_empty(cx, &item)),
281281
ty::Projection(ref proj) => has_is_empty_impl(cx, proj.item_def_id),
282282
ty::Adt(id, _) => has_is_empty_impl(cx, id.did),

0 commit comments

Comments
 (0)