Skip to content

Commit 4f3816b

Browse files
authored
Rollup merge of #148468 - lcnr:opaques-early-binder, r=lqd
add logging to `fudge_inference_if_ok` it was useful when debugging rust-lang/trait-system-refactor-initiative#252
2 parents 0719287 + 5f31207 commit 4f3816b

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_infer/src/infer/snapshot

1 file changed

+3
-1
lines changed

compiler/rustc_infer/src/infer/snapshot/fudge.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::fmt::Debug;
12
use std::ops::Range;
23

34
use rustc_data_structures::{snapshot_vec as sv, unify as ut};
@@ -84,11 +85,12 @@ impl<'tcx> InferCtxt<'tcx> {
8485
/// the actual types (`?T`, `Option<?T>`) -- and remember that
8586
/// after the snapshot is popped, the variable `?T` is no longer
8687
/// unified.
87-
#[instrument(skip(self, f), level = "debug")]
88+
#[instrument(skip(self, f), level = "debug", ret)]
8889
pub fn fudge_inference_if_ok<T, E, F>(&self, f: F) -> Result<T, E>
8990
where
9091
F: FnOnce() -> Result<T, E>,
9192
T: TypeFoldable<TyCtxt<'tcx>>,
93+
E: Debug,
9294
{
9395
let variable_lengths = self.variable_lengths();
9496
let (snapshot_vars, value) = self.probe(|_| {

0 commit comments

Comments
 (0)