about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2023-06-09 01:11:58 +0100
committerBoxy <supbscripter@gmail.com>2023-06-19 09:08:03 +0100
commit9af7122b1d104b223c99a1587c468277d85ce2e5 (patch)
tree03574d4c1f2342d790c5b0634eeccf0ec7d0ff89 /compiler/rustc_trait_selection
parentbb743f863590f8dae7d9121b11ea755399f88977 (diff)
downloadrust-9af7122b1d104b223c99a1587c468277d85ce2e5.tar.gz
rust-9af7122b1d104b223c99a1587c468277d85ce2e5.zip
create module so that RUSTC_LOG can filter to just proof trees
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt.rs3
-rw-r--r--compiler/rustc_trait_selection/src/solve/inspect.rs2
-rw-r--r--compiler/rustc_trait_selection/src/solve/inspect/dump.rs5
3 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
index a8c569cd38b..4258f9f6bd2 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
@@ -164,7 +164,8 @@ impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
 
         let tree = ecx.inspect.finalize();
         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!(
diff --git a/compiler/rustc_trait_selection/src/solve/inspect.rs b/compiler/rustc_trait_selection/src/solve/inspect.rs
index 3cba141d9a1..c3dea5f790a 100644
--- a/compiler/rustc_trait_selection/src/solve/inspect.rs
+++ b/compiler/rustc_trait_selection/src/solve/inspect.rs
@@ -10,6 +10,8 @@ use rustc_middle::{
     ty,
 };
 
+pub mod dump;
+
 #[derive(Eq, PartialEq, Debug, Hash, HashStable)]
 pub struct WipGoalEvaluation<'tcx> {
     pub uncanonicalized_goal: Goal<'tcx, ty::Predicate<'tcx>>,
diff --git a/compiler/rustc_trait_selection/src/solve/inspect/dump.rs b/compiler/rustc_trait_selection/src/solve/inspect/dump.rs
new file mode 100644
index 00000000000..b755ee86215
--- /dev/null
+++ b/compiler/rustc_trait_selection/src/solve/inspect/dump.rs
@@ -0,0 +1,5 @@
+use rustc_middle::traits::solve::inspect::GoalEvaluation;
+
+pub fn print_tree(tree: &GoalEvaluation<'_>) {
+    debug!(?tree);
+}