Skip to content

Commit

Permalink
downgrade some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Sep 12, 2021
1 parent 69fe39e commit f78acae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
13 changes: 8 additions & 5 deletions src/librustdoc/clean/blanket_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
let param_env = self.cx.tcx.param_env(item_def_id);
let ty = self.cx.tcx.type_of(item_def_id);

debug!("get_blanket_impls({:?})", ty);
trace!("get_blanket_impls({:?})", ty);
let mut impls = Vec::new();
for &trait_def_id in self.cx.tcx.all_traits(()).iter() {
if !self.cx.cache.access_levels.is_public(trait_def_id)
Expand All @@ -28,9 +28,10 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
// NOTE: doesn't use `for_each_relevant_impl` to avoid looking at anything besides blanket impls
let trait_impls = self.cx.tcx.trait_impls_of(trait_def_id);
for &impl_def_id in trait_impls.blanket_impls() {
debug!(
trace!(
"get_blanket_impls: Considering impl for trait '{:?}' {:?}",
trait_def_id, impl_def_id
trait_def_id,
impl_def_id
);
let trait_ref = self.cx.tcx.impl_trait_ref(impl_def_id).unwrap();
let is_param = matches!(trait_ref.self_ty().kind(), ty::Param(_));
Expand All @@ -50,9 +51,11 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
// FIXME(eddyb) ignoring `obligations` might cause false positives.
drop(obligations);

debug!(
trace!(
"invoking predicate_may_hold: param_env={:?}, trait_ref={:?}, ty={:?}",
param_env, trait_ref, ty
param_env,
trait_ref,
ty
);
let predicates = self
.cx
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/clean/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ crate fn build_impl(
}

let (merged_attrs, cfg) = merge_attrs(cx, parent_module.into(), load_attrs(cx, did), attrs);
debug!("merged_attrs={:?}", merged_attrs);
trace!("merged_attrs={:?}", merged_attrs);

debug!("build_impl: impl {:?} for {:?}", trait_.def_id(), for_.def_id());
trace!("build_impl: impl {:?} for {:?}", trait_.def_id(), for_.def_id());
ret.push(clean::Item::from_def_id_and_attrs_and_parts(
did,
None,
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ fn normalize(cx: &mut DocContext<'tcx>, ty: Ty<'_>) -> Option<Ty<'tcx>> {

impl<'tcx> Clean<Type> for Ty<'tcx> {
fn clean(&self, cx: &mut DocContext<'_>) -> Type {
debug!("cleaning type: {:?}", self);
trace!("cleaning type: {:?}", self);
let ty = normalize(cx, self).unwrap_or(self);
match *ty.kind() {
ty::Never => Never,
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ fn fmt_type<'cx>(
use_absolute: bool,
cx: &'cx Context<'_>,
) -> fmt::Result {
debug!("fmt_type(t = {:?})", t);
trace!("fmt_type(t = {:?})", t);

match *t {
clean::Generic(name) => write!(f, "{}", name),
Expand Down

0 comments on commit f78acae

Please sign in to comment.