create module so that RUSTC_LOG can filter to just proof trees

This commit is contained in:
Boxy 2023-06-09 01:11:58 +01:00
parent bb743f8635
commit 9af7122b1d
3 changed files with 9 additions and 1 deletions

View file

@ -164,7 +164,8 @@ impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
let tree = ecx.inspect.finalize(); let tree = ecx.inspect.finalize();
if let Some(tree) = &tree { if let Some(tree) = &tree {
debug!(?tree); // module to allow more granular RUSTC_LOG filtering to just proof tree output
super::inspect::dump::print_tree(tree);
} }
assert!( assert!(

View file

@ -10,6 +10,8 @@ use rustc_middle::{
ty, ty,
}; };
pub mod dump;
#[derive(Eq, PartialEq, Debug, Hash, HashStable)] #[derive(Eq, PartialEq, Debug, Hash, HashStable)]
pub struct WipGoalEvaluation<'tcx> { pub struct WipGoalEvaluation<'tcx> {
pub uncanonicalized_goal: Goal<'tcx, ty::Predicate<'tcx>>, pub uncanonicalized_goal: Goal<'tcx, ty::Predicate<'tcx>>,

View file

@ -0,0 +1,5 @@
use rustc_middle::traits::solve::inspect::GoalEvaluation;
pub fn print_tree(tree: &GoalEvaluation<'_>) {
debug!(?tree);
}