Rename clean::Item.source to span

Its type is called `clean::Span`, and also the name in the rest of
rustdoc and rustc for this kind of field is `span`.
This commit is contained in:
Camelid
2021-03-09 21:23:29 -08:00
parent f82664191d
commit 8b9b106cdc
15 changed files with 38 additions and 34 deletions

View File

@@ -212,7 +212,7 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
return Some(i);
}
clean::ImplItem(ref impl_) => {
let filename = i.source.filename(self.ctx.sess());
let filename = i.span.filename(self.ctx.sess());
if let Some(ref tr) = impl_.trait_ {
debug!(
"impl {:#} for {:#} in {}",
@@ -243,7 +243,7 @@ impl<'a, 'b> fold::DocFolder for CoverageCalculator<'a, 'b> {
None,
);
let filename = i.source.filename(self.ctx.sess());
let filename = i.span.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);