This commit is contained in:
Matthias Krüger 2018-12-08 01:56:03 +01:00 committed by Philipp Hansch
parent 26602ddff4
commit f13d23de41
No known key found for this signature in database
GPG key ID: B6FA06A6E0E2665B
46 changed files with 140 additions and 140 deletions

View file

@ -142,8 +142,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
hir::ItemKind::Fn(..) => {
// ignore main()
if it.name == "main" {
let def_id = cx.tcx.hir.local_def_id(it.id);
let def_key = cx.tcx.hir.def_key(def_id);
let def_id = cx.tcx.hir().local_def_id(it.id);
let def_key = cx.tcx.hir().def_key(def_id);
if def_key.parent == Some(hir::def_id::CRATE_DEF_INDEX) {
return;
}
@ -180,7 +180,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, impl_item: &'tcx hir::ImplItem) {
// If the method is an impl for a trait, don't doc.
let def_id = cx.tcx.hir.local_def_id(impl_item.id);
let def_id = cx.tcx.hir().local_def_id(impl_item.id);
match cx.tcx.associated_item(def_id).container {
ty::TraitContainer(_) => return,
ty::ImplContainer(cid) => {