Get rid of item.span
- Remove `span` field, adding `Item::span()` instead - Special-case `Impl` and `Module` items - Use dummy spans for primitive items
This commit is contained in:
@@ -211,7 +211,7 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
|
||||
None,
|
||||
);
|
||||
|
||||
let filename = i.span().filename(self.ctx.sess());
|
||||
let filename = i.span(self.ctx.tcx).filename(self.ctx.sess());
|
||||
let has_doc_example = tests.found_tests != 0;
|
||||
let hir_id = self.ctx.tcx.hir().local_def_id_to_hir_id(i.def_id.expect_local());
|
||||
let (level, source) = self.ctx.tcx.lint_level_at_node(MISSING_DOCS, hir_id);
|
||||
|
||||
Reference in New Issue
Block a user