From 5f312079f2782999e07ff25869e1353082bbe240 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 4 Nov 2025 12:02:58 +0100 Subject: [PATCH] add logging to `fudge_inference_if_ok` --- compiler/rustc_infer/src/infer/snapshot/fudge.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_infer/src/infer/snapshot/fudge.rs b/compiler/rustc_infer/src/infer/snapshot/fudge.rs index e210479581ba6..3730d215a901e 100644 --- a/compiler/rustc_infer/src/infer/snapshot/fudge.rs +++ b/compiler/rustc_infer/src/infer/snapshot/fudge.rs @@ -1,3 +1,4 @@ +use std::fmt::Debug; use std::ops::Range; use rustc_data_structures::{snapshot_vec as sv, unify as ut}; @@ -84,11 +85,12 @@ impl<'tcx> InferCtxt<'tcx> { /// the actual types (`?T`, `Option`) -- and remember that /// after the snapshot is popped, the variable `?T` is no longer /// unified. - #[instrument(skip(self, f), level = "debug")] + #[instrument(skip(self, f), level = "debug", ret)] pub fn fudge_inference_if_ok(&self, f: F) -> Result where F: FnOnce() -> Result, T: TypeFoldable>, + E: Debug, { let variable_lengths = self.variable_lengths(); let (snapshot_vars, value) = self.probe(|_| {