1
Fork 0
This commit is contained in:
Matthias Krüger 2020-04-24 11:57:34 +02:00 committed by flip1995
parent 02c94352d4
commit f9c1acbc45
No known key found for this signature in database
GPG key ID: 2CEFCDB27ED0BE79
11 changed files with 27 additions and 22 deletions

View file

@ -155,7 +155,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DocMarkdown {
let headers = check_attrs(cx, &self.valid_idents, &item.attrs);
match item.kind {
hir::ItemKind::Fn(ref sig, _, body_id) => {
if !(is_entrypoint_fn(cx, cx.tcx.hir().local_def_id(item.hir_id))
if !(is_entrypoint_fn(cx, cx.tcx.hir().local_def_id(item.hir_id).to_def_id())
|| in_external_macro(cx.tcx.sess, item.span))
{
lint_for_missing_headers(cx, item.hir_id, item.span, sig, headers, Some(body_id));