rustdoc: Rename expect_real to expect_def_id, remove Item::is_fake
This commit is contained in:
@@ -213,13 +213,13 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
|
||||
|
||||
let filename = i.span(self.ctx.tcx).filename(self.ctx.sess());
|
||||
let has_doc_example = tests.found_tests != 0;
|
||||
// The `expect_real()` should be okay because `local_def_id_to_hir_id`
|
||||
// The `expect_def_id()` should be okay because `local_def_id_to_hir_id`
|
||||
// would presumably panic if a fake `DefIndex` were passed.
|
||||
let hir_id = self
|
||||
.ctx
|
||||
.tcx
|
||||
.hir()
|
||||
.local_def_id_to_hir_id(i.def_id.expect_real().expect_local());
|
||||
.local_def_id_to_hir_id(i.def_id.expect_def_id().expect_local());
|
||||
let (level, source) = self.ctx.tcx.lint_level_at_node(MISSING_DOCS, hir_id);
|
||||
// `missing_docs` is allow-by-default, so don't treat this as ignoring the item
|
||||
// unless the user had an explicit `allow`
|
||||
|
||||
Reference in New Issue
Block a user