This commit is contained in:
Yuki Okushi
2020-01-18 14:14:36 +09:00
parent 6bd0580887
commit e72f0e61c6
24 changed files with 75 additions and 28 deletions

View File

@@ -357,7 +357,7 @@ pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'_, 'tcx>, hir_id: HirId) -> O
if_chain! {
if parent_impl != hir::CRATE_HIR_ID;
if let hir::Node::Item(item) = cx.tcx.hir().get(parent_impl);
if let hir::ItemKind::Impl(_, _, _, _, trait_ref, _, _) = &item.kind;
if let hir::ItemKind::Impl{ of_trait: trait_ref, .. } = &item.kind;
then { return trait_ref.as_ref(); }
}
None