tracing::instrument cleanup
This commit is contained in:
parent
ee3c835018
commit
1fc9ef1edd
40 changed files with 117 additions and 247 deletions
|
@ -19,7 +19,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
/// Converts an evaluated constant to a pattern (if possible).
|
||||
/// This means aggregate values (like structs and enums) are converted
|
||||
/// to a pattern that matches the value (as if you'd compared via structural equality).
|
||||
#[instrument(level = "debug", skip(self))]
|
||||
#[instrument(level = "debug", skip(self), ret)]
|
||||
pub(super) fn const_to_pat(
|
||||
&self,
|
||||
cv: mir::ConstantKind<'tcx>,
|
||||
|
@ -27,13 +27,10 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
|
|||
span: Span,
|
||||
mir_structural_match_violation: bool,
|
||||
) -> Pat<'tcx> {
|
||||
let pat = self.tcx.infer_ctxt().enter(|infcx| {
|
||||
self.tcx.infer_ctxt().enter(|infcx| {
|
||||
let mut convert = ConstToPat::new(self, id, span, infcx);
|
||||
convert.to_pat(cv, mir_structural_match_violation)
|
||||
});
|
||||
|
||||
debug!(?pat);
|
||||
pat
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -791,7 +791,7 @@ fn lint_non_exhaustive_omitted_patterns<'p, 'tcx>(
|
|||
/// `is_under_guard` is used to inform if the pattern has a guard. If it
|
||||
/// has one it must not be inserted into the matrix. This shouldn't be
|
||||
/// relied on for soundness.
|
||||
#[instrument(level = "debug", skip(cx, matrix, hir_id))]
|
||||
#[instrument(level = "debug", skip(cx, matrix, hir_id), ret)]
|
||||
fn is_useful<'p, 'tcx>(
|
||||
cx: &MatchCheckCtxt<'p, 'tcx>,
|
||||
matrix: &Matrix<'p, 'tcx>,
|
||||
|
@ -917,7 +917,6 @@ fn is_useful<'p, 'tcx>(
|
|||
v.head().set_reachable();
|
||||
}
|
||||
|
||||
debug!(?ret);
|
||||
ret
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue