mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Merge pull request #3315 from rust-lang-nursery/oli-obk-patch-1
fix for rustc master
This commit is contained in:
@@ -276,7 +276,7 @@ fn has_is_empty_impl(cx: &LateContext<'_, '_>, id: DefId) -> bool {
|
|||||||
let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
|
let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
|
||||||
match ty.sty {
|
match ty.sty {
|
||||||
ty::Dynamic(ref tt, ..) => cx.tcx
|
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)),
|
.any(|item| is_is_empty(cx, &item)),
|
||||||
ty::Projection(ref proj) => has_is_empty_impl(cx, proj.item_def_id),
|
ty::Projection(ref proj) => has_is_empty_impl(cx, proj.item_def_id),
|
||||||
ty::Adt(id, _) => has_is_empty_impl(cx, id.did),
|
ty::Adt(id, _) => has_is_empty_impl(cx, id.did),
|
||||||
|
|||||||
Reference in New Issue
Block a user