struct MirPrettyCtx<'a, 'db> {
body: &'a MirBody<'db>,
hir_body: &'a ExpressionStore,
db: &'db dyn HirDatabase,
result: String,
indent: String,
local_to_binding: ArenaMap<LocalId, BindingId>,
display_target: DisplayTarget,
}Fields§
§body: &'a MirBody<'db>§hir_body: &'a ExpressionStore§db: &'db dyn HirDatabase§result: String§indent: String§local_to_binding: ArenaMap<LocalId, BindingId>§display_target: DisplayTargetImplementations§
Source§impl<'a, 'db> MirPrettyCtx<'a, 'db>
impl<'a, 'db> MirPrettyCtx<'a, 'db>
fn for_body(&mut self, name: impl FnOnce(&mut MirPrettyCtx<'_, 'db>))
fn for_closure(&mut self, closure: InternedClosureId<'db>)
fn with_block(&mut self, f: impl FnOnce(&mut MirPrettyCtx<'_, 'db>))
fn new( body: &'a MirBody<'db>, hir_body: &'a ExpressionStore, db: &'db dyn HirDatabase, display_target: DisplayTarget, ) -> Self
fn write_line(&mut self)
fn write(&mut self, line: &str)
fn locals(&mut self)
fn local_name(&self, local: LocalId) -> LocalName
fn basic_block_id(&self, basic_block_id: BasicBlockId) -> String
fn blocks(&mut self)
fn place(&mut self, p: &Place)
fn operand(&mut self, r: &Operand)
fn rvalue(&mut self, r: &Rvalue)
fn operand_list(&mut self, it: &[Operand])
fn hir_display<'b, T: HirDisplay<'db>>(
&self,
ty: &'b T,
) -> impl Display + use<'a, 'b, 'db, T>where
'db: 'b,
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'db> Freeze for MirPrettyCtx<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for MirPrettyCtx<'a, 'db>
impl<'a, 'db> !Send for MirPrettyCtx<'a, 'db>
impl<'a, 'db> !Sync for MirPrettyCtx<'a, 'db>
impl<'a, 'db> Unpin for MirPrettyCtx<'a, 'db>
impl<'a, 'db> UnsafeUnpin for MirPrettyCtx<'a, 'db>
impl<'a, 'db> !UnwindSafe for MirPrettyCtx<'a, 'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more