1
Fork 0
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

@ -159,7 +159,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DocMarkdown {
lint_for_missing_headers(cx, item.hir_id, item.span, sig, headers);
}
},
hir::ItemKind::Impl(_, _, _, _, ref trait_ref, ..) => {
hir::ItemKind::Impl {
of_trait: ref trait_ref,
..
} => {
self.in_trait_impl = trait_ref.is_some();
},
_ => {},
@ -167,7 +170,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DocMarkdown {
}
fn check_item_post(&mut self, _cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item<'_>) {
if let hir::ItemKind::Impl(..) = item.kind {
if let hir::ItemKind::Impl { .. } = item.kind {
self.in_trait_impl = false;
}
}