From 907ce72c434950e7d0492e5a1af15d4f9a2b2abd Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Tue, 17 Aug 2021 16:12:11 -0700 Subject: [PATCH 1/2] Expose graphviz modules --- compiler/rustc_mir/src/dataflow/framework/mod.rs | 2 +- compiler/rustc_mir/src/dataflow/mod.rs | 2 +- compiler/rustc_mir/src/util/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_mir/src/dataflow/framework/mod.rs b/compiler/rustc_mir/src/dataflow/framework/mod.rs index 344d7b9becd19..a5badc07d1017 100644 --- a/compiler/rustc_mir/src/dataflow/framework/mod.rs +++ b/compiler/rustc_mir/src/dataflow/framework/mod.rs @@ -42,7 +42,7 @@ mod cursor; mod direction; mod engine; pub mod fmt; -mod graphviz; +pub mod graphviz; pub mod lattice; mod visitor; diff --git a/compiler/rustc_mir/src/dataflow/mod.rs b/compiler/rustc_mir/src/dataflow/mod.rs index 03531a6b0049c..4ca757cf269e4 100644 --- a/compiler/rustc_mir/src/dataflow/mod.rs +++ b/compiler/rustc_mir/src/dataflow/mod.rs @@ -5,7 +5,7 @@ use rustc_span::symbol::{sym, Symbol}; pub(crate) use self::drop_flag_effects::*; pub use self::framework::{ - fmt, lattice, visit_results, Analysis, AnalysisDomain, Backward, BorrowckFlowState, + fmt, graphviz, lattice, visit_results, Analysis, AnalysisDomain, Backward, BorrowckFlowState, BorrowckResults, Engine, Forward, GenKill, GenKillAnalysis, JoinSemiLattice, Results, ResultsCursor, ResultsRefCursor, ResultsVisitor, SwitchIntEdgeEffects, }; diff --git a/compiler/rustc_mir/src/util/mod.rs b/compiler/rustc_mir/src/util/mod.rs index b7b702431bc2a..3e466b5060feb 100644 --- a/compiler/rustc_mir/src/util/mod.rs +++ b/compiler/rustc_mir/src/util/mod.rs @@ -18,4 +18,4 @@ pub use self::alignment::is_disaligned; pub use self::find_self_call::find_self_call; pub use self::generic_graph::graphviz_safe_def_name; pub use self::graphviz::write_mir_graphviz; -pub use self::pretty::{dump_enabled, dump_mir, write_mir_pretty, PassWhere}; +pub use self::pretty::{dump_enabled, dump_mir, write_mir_fn, write_mir_pretty, PassWhere}; From 0ce96bdcfad27bcfc171afe37b105e02cd82cf61 Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Tue, 17 Aug 2021 20:55:15 -0700 Subject: [PATCH 2/2] Fix bug in fmt_diff_with --- compiler/rustc_mir/src/dataflow/framework/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_mir/src/dataflow/framework/fmt.rs b/compiler/rustc_mir/src/dataflow/framework/fmt.rs index 0140a75054433..35115ca9db756 100644 --- a/compiler/rustc_mir/src/dataflow/framework/fmt.rs +++ b/compiler/rustc_mir/src/dataflow/framework/fmt.rs @@ -33,7 +33,7 @@ pub trait DebugWithContext: Eq + fmt::Debug { } write!(f, "\u{001f}-")?; - self.fmt_with(ctxt, f) + old.fmt_with(ctxt, f) } }