File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -258,11 +258,10 @@ fn has_is_empty(cx: &LateContext, expr: &Expr) -> bool {
258
258
259
259
let ty = & walk_ptrs_ty ( cx. tables . expr_ty ( expr) ) ;
260
260
match ty. sty {
261
- ty:: TyDynamic ( ..) => cx. tcx
262
- . associated_items ( ty . ty_to_def_id ( ) . expect ( "trait impl not found" ) )
261
+ ty:: TyDynamic ( ref tt , ..) => cx. tcx
262
+ . associated_items ( tt . principal ( ) . expect ( "trait impl not found" ) . def_id ( ) )
263
263
. any ( |item| is_is_empty ( cx, & item) ) ,
264
- ty:: TyProjection ( _) => ty. ty_to_def_id ( )
265
- . map_or ( false , |id| has_is_empty_impl ( cx, id) ) ,
264
+ ty:: TyProjection ( ref proj) => has_is_empty_impl ( cx, proj. item_def_id ) ,
266
265
ty:: TyAdt ( id, _) => has_is_empty_impl ( cx, id. did ) ,
267
266
ty:: TyArray ( ..) | ty:: TySlice ( ..) | ty:: TyStr => true ,
268
267
_ => false ,
You can’t perform that action at this time.
0 commit comments