Move to print functions on types instead of impl fmt::Display
This will eventually allow us to easily pass in more parameters to the functions without TLS or other such hacks
This commit is contained in:
parent
eb48d6bdee
commit
04b27efa00
8 changed files with 591 additions and 561 deletions
|
@ -142,7 +142,8 @@ impl fold::DocFolder for CoverageCalculator {
|
|||
}
|
||||
clean::ImplItem(ref impl_) => {
|
||||
if let Some(ref tr) = impl_.trait_ {
|
||||
debug!("impl {:#} for {:#} in {}", tr, impl_.for_, i.source.filename);
|
||||
debug!("impl {:#} for {:#} in {}",
|
||||
tr.print(), impl_.for_.print(), i.source.filename);
|
||||
|
||||
// don't count trait impls, the missing-docs lint doesn't so we shouldn't
|
||||
// either
|
||||
|
@ -151,11 +152,11 @@ impl fold::DocFolder for CoverageCalculator {
|
|||
// inherent impls *can* be documented, and those docs show up, but in most
|
||||
// cases it doesn't make sense, as all methods on a type are in one single
|
||||
// impl block
|
||||
debug!("impl {:#} in {}", impl_.for_, i.source.filename);
|
||||
debug!("impl {:#} in {}", impl_.for_.print(), i.source.filename);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
debug!("counting {} {:?} in {}", i.type_(), i.name, i.source.filename);
|
||||
debug!("counting {:?} {:?} in {}", i.type_(), i.name, i.source.filename);
|
||||
self.items.entry(i.source.filename.clone())
|
||||
.or_default()
|
||||
.count_item(has_docs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue