Trait rustc_mir_dataflow::framework::fmt::DebugWithContext
source · pub trait DebugWithContext<C>: Eq + Debug {
// Provided methods
fn fmt_with(&self, _ctxt: &C, f: &mut Formatter<'_>) -> Result { ... }
fn fmt_diff_with(
&self,
old: &Self,
ctxt: &C,
f: &mut Formatter<'_>
) -> Result { ... }
}
Expand description
An extension to fmt::Debug
for data that can be better printed with some auxiliary data C
.
Provided Methods§
fn fmt_with(&self, _ctxt: &C, f: &mut Formatter<'_>) -> Result
sourcefn fmt_diff_with(&self, old: &Self, ctxt: &C, f: &mut Formatter<'_>) -> Result
fn fmt_diff_with(&self, old: &Self, ctxt: &C, f: &mut Formatter<'_>) -> Result
Print the difference between self
and old
.
This should print nothing if self == old
.
+
and -
are typically used to indicate differences. However, these characters are
fairly common and may be needed to print a types representation. If using them to indicate
a diff, prefix them with the “Unit Separator” control character (␟ U+001F).
Implementations on Foreign Types§
source§impl<T, C> DebugWithContext<C> for BitSet<T>where
T: Idx + DebugWithContext<C>,
impl<T, C> DebugWithContext<C> for BitSet<T>where T: Idx + DebugWithContext<C>,
source§impl<T, C> DebugWithContext<C> for &Twhere
T: DebugWithContext<C>,
impl<T, C> DebugWithContext<C> for &Twhere T: DebugWithContext<C>,
source§impl<T, C> DebugWithContext<C> for ChunkedBitSet<T>where
T: Idx + DebugWithContext<C>,
impl<T, C> DebugWithContext<C> for ChunkedBitSet<T>where T: Idx + DebugWithContext<C>,
impl<C> DebugWithContext<C> for Local
Implementors§
impl<'tcx, C> DebugWithContext<C> for MovePathIndexwhere C: HasMoveData<'tcx>,
impl<'tcx, T> DebugWithContext<ValueAnalysisWrapper<T>> for State<T::Value>where T: ValueAnalysis<'tcx>, T::Value: Debug,
This is used to visualize the dataflow analysis.