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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user