structurally important functions to debug

This commit is contained in:
lcnr
2024-05-12 03:46:24 +00:00
parent 41ebd16266
commit c66328f9ad
4 changed files with 13 additions and 10 deletions

View File

@@ -282,7 +282,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
};
if normalized_self_ty.is_ty_var() {
trace!("self type has been normalized to infer");
debug!("self type has been normalized to infer");
return self.forced_ambiguity(MaybeCause::Ambiguity).into_iter().collect();
}
@@ -785,7 +785,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
// FIXME(@lcnr): The current structure here makes me unhappy and feels ugly. idk how
// to improve this however. However, this should make it fairly straightforward to refine
// the filtering going forward, so it seems alright-ish for now.
#[instrument(level = "trace", skip(self, goal))]
#[instrument(level = "debug", skip(self, goal))]
fn discard_impls_shadowed_by_env<G: GoalKind<'tcx>>(
&mut self,
goal: Goal<'tcx, G>,
@@ -814,7 +814,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
Certainty::Yes => {
candidates.retain(|c| match c.source {
CandidateSource::Impl(_) | CandidateSource::BuiltinImpl(_) => {
trace!(?c, "discard impl candidate");
debug!(?c, "discard impl candidate");
false
}
CandidateSource::ParamEnv(_) | CandidateSource::AliasBound => true,
@@ -825,7 +825,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
// to be ambig and wait for inference constraints. See
// tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs
Certainty::Maybe(cause) => {
trace!(?cause, "force ambiguity");
debug!(?cause, "force ambiguity");
*candidates = self.forced_ambiguity(cause).into_iter().collect();
}
}
@@ -836,7 +836,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
/// If there are multiple ways to prove a trait or projection goal, we have
/// to somehow try to merge the candidates into one. If that fails, we return
/// ambiguity.
#[instrument(level = "trace", skip(self), ret)]
#[instrument(level = "debug", skip(self), ret)]
pub(super) fn merge_candidates(
&mut self,
candidates: Vec<Candidate<'tcx>>,