pub struct LeanPrinter;Expand description
The Lean printer
Implementations§
Source§impl LeanPrinter
impl LeanPrinter
Sourcepub fn printable_item(item: &Item) -> bool
pub fn printable_item(item: &Item) -> bool
A filter for items blacklisted by the Lean backend : returns false if the item is definitely not printable, but might return true on unsupported items
Sourcepub fn render_id(&self, id: &GlobalId) -> String
pub fn render_id(&self, id: &GlobalId) -> String
Render a global id using the Rendering strategy of the Lean printer. Works for both concrete and projector ids. TODO: https://github.com/cryspen/hax/issues/1660
Sourcepub fn escape(&self, id: String) -> String
pub fn escape(&self, id: String) -> String
Escapes local identifiers (prefixing reserved keywords with an underscore). TODO: This should be treated directly in the name rendering engine, see https://github.com/cryspen/hax/issues/1630
Sourcepub fn render_symbol(&self, symbol: Symbol) -> String
pub fn render_symbol(&self, symbol: Symbol) -> String
Renders a single symbol, used for anonymous implementations of typeclasses
Sourcepub fn render_last(&self, id: &GlobalId) -> String
pub fn render_last(&self, id: &GlobalId) -> String
Renders the last, most local part of an id. Used for named arguments of constructors.
Source§impl LeanPrinter
impl LeanPrinter
Trait Implementations§
Source§impl Default for LeanPrinter
impl Default for LeanPrinter
Source§fn default() -> LeanPrinter
fn default() -> LeanPrinter
Source§impl<'a, A: 'a> DocAllocator<'a, A> for LeanPrinter
impl<'a, A: 'a> DocAllocator<'a, A> for LeanPrinter
type Doc = BoxDoc<'a, A>
fn alloc(&'a self, doc: Doc<'a, Self::Doc, A>) -> Self::Doc
fn alloc_column_fn( &'a self, f: impl Fn(usize) -> Self::Doc + 'a, ) -> <Self::Doc as DocPtr<'a, A>>::ColumnFn
fn alloc_width_fn( &'a self, f: impl Fn(isize) -> Self::Doc + 'a, ) -> <Self::Doc as DocPtr<'a, A>>::WidthFn
fn alloc_cow(&'a self, doc: BuildDoc<'a, Self::Doc, A>) -> Self::Doc
Source§fn nil(&'a self) -> DocBuilder<'a, Self, A>
fn nil(&'a self) -> DocBuilder<'a, Self, A>
Source§fn fail(&'a self) -> DocBuilder<'a, Self, A>
fn fail(&'a self) -> DocBuilder<'a, Self, A>
Source§fn hardline(&'a self) -> DocBuilder<'a, Self, A>
fn hardline(&'a self) -> DocBuilder<'a, Self, A>
fn space(&'a self) -> DocBuilder<'a, Self, A>
Source§fn line(&'a self) -> DocBuilder<'a, Self, A>
fn line(&'a self) -> DocBuilder<'a, Self, A>
\n but behaves like space if it is grouped on a single line.Source§fn line_(&'a self) -> DocBuilder<'a, Self, A>
fn line_(&'a self) -> DocBuilder<'a, Self, A>
Source§fn softline(&'a self) -> DocBuilder<'a, Self, A>
fn softline(&'a self) -> DocBuilder<'a, Self, A>
softline acts like space if the document fits the page, otherwise like lineSource§fn softline_(&'a self) -> DocBuilder<'a, Self, A>
fn softline_(&'a self) -> DocBuilder<'a, Self, A>
softline_ acts like nil if the document fits the page, otherwise like line_Source§fn as_string<U>(&'a self, data: U) -> DocBuilder<'a, Self, A>where
U: Display,
fn as_string<U>(&'a self, data: U) -> DocBuilder<'a, Self, A>where
U: Display,
t.to_string(). Read moreSource§fn text<U>(&'a self, data: U) -> DocBuilder<'a, Self, A>
fn text<U>(&'a self, data: U) -> DocBuilder<'a, Self, A>
Source§fn concat<I>(&'a self, docs: I) -> DocBuilder<'a, Self, A>
fn concat<I>(&'a self, docs: I) -> DocBuilder<'a, Self, A>
Source§fn intersperse<I, S>(&'a self, docs: I, separator: S) -> DocBuilder<'a, Self, A>where
I: IntoIterator,
<I as IntoIterator>::Item: Pretty<'a, Self, A>,
S: Pretty<'a, Self, A> + Clone,
fn intersperse<I, S>(&'a self, docs: I, separator: S) -> DocBuilder<'a, Self, A>where
I: IntoIterator,
<I as IntoIterator>::Item: Pretty<'a, Self, A>,
S: Pretty<'a, Self, A> + Clone,
S between the given documents
[A, B, C, ..., Z], yielding [A, S, B, S, C, S, ..., S, Z]. Read moreSource§fn column(
&'a self,
f: impl Fn(usize) -> Self::Doc + 'a,
) -> DocBuilder<'a, Self, A>
fn column( &'a self, f: impl Fn(usize) -> Self::Doc + 'a, ) -> DocBuilder<'a, Self, A>
Source§impl<'a, A: 'a + Clone> Pretty<'a, LeanPrinter, A> for &Vec<Param>
Render parameters, adding a line after each parameter
impl<'a, A: 'a + Clone> Pretty<'a, LeanPrinter, A> for &Vec<Param>
Render parameters, adding a line after each parameter
Source§fn pretty(self, allocator: &'a LeanPrinter) -> DocBuilder<'a, LeanPrinter, A>
fn pretty(self, allocator: &'a LeanPrinter) -> DocBuilder<'a, LeanPrinter, A>
self into a documentSource§impl<'a, 'b, A: 'a + Clone> PrettyAst<'a, 'b, A> for LeanPrinter
impl<'a, 'b, A: 'a + Clone> PrettyAst<'a, 'b, A> for LeanPrinter
Source§fn generics(&'a self, _: &'b Generics) -> DocBuilder<'a, Self, A>
👎Deprecated: Do not call this method directly. Use [pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.
fn generics(&'a self, _: &'b Generics) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.Render generics, adding a space after each parameter
Source§const NAME: &'static str = "Lean"
const NAME: &'static str = "Lean"
PrettyAst.
Useful for diagnostics and debugging.Source§fn module(&'a self, module: &'b Module) -> DocBuilder<'a, Self, A>
fn module(&'a self, module: &'b Module) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn global_id(&'a self, global_id: &'b GlobalId) -> DocBuilder<'a, Self, A>
fn global_id(&'a self, global_id: &'b GlobalId) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn generic_constraint(
&'a self,
generic_constraint: &'b GenericConstraint,
) -> DocBuilder<'a, Self, A>
fn generic_constraint( &'a self, generic_constraint: &'b GenericConstraint, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn generic_param(
&'a self,
generic_param: &'b GenericParam,
) -> DocBuilder<'a, Self, A>
fn generic_param( &'a self, generic_param: &'b GenericParam, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn expr(&'a self, _: &'b Expr) -> DocBuilder<'a, Self, A>
fn expr(&'a self, _: &'b Expr) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn arm(&'a self, arm: &'b Arm) -> DocBuilder<'a, Self, A>
fn arm(&'a self, arm: &'b Arm) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn pat(&'a self, pat: &'b Pat) -> DocBuilder<'a, Self, A>
fn pat(&'a self, pat: &'b Pat) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn pat_kind(&'a self, pat_kind: &'b PatKind) -> DocBuilder<'a, Self, A>
fn pat_kind(&'a self, pat_kind: &'b PatKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn ty(&'a self, ty: &'b Ty) -> DocBuilder<'a, Self, A>
fn ty(&'a self, ty: &'b Ty) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn literal(&'a self, literal: &'b Literal) -> DocBuilder<'a, Self, A>
fn literal(&'a self, literal: &'b Literal) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn local_id(&'a self, local_id: &'b LocalId) -> DocBuilder<'a, Self, A>
fn local_id(&'a self, local_id: &'b LocalId) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn spanned_ty(&'a self, spanned_ty: &'b SpannedTy) -> DocBuilder<'a, Self, A>
fn spanned_ty(&'a self, spanned_ty: &'b SpannedTy) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn primitive_ty(
&'a self,
primitive_ty: &'b PrimitiveTy,
) -> DocBuilder<'a, Self, A>
fn primitive_ty( &'a self, primitive_ty: &'b PrimitiveTy, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn int_kind(&'a self, int_kind: &'b IntKind) -> DocBuilder<'a, Self, A>
fn int_kind(&'a self, int_kind: &'b IntKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn generic_value(
&'a self,
generic_value: &'b GenericValue,
) -> DocBuilder<'a, Self, A>
fn generic_value( &'a self, generic_value: &'b GenericValue, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn quote_content(
&'a self,
quote_content: &'b QuoteContent,
) -> DocBuilder<'a, Self, A>
fn quote_content( &'a self, quote_content: &'b QuoteContent, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn quote(&'a self, quote: &'b Quote) -> DocBuilder<'a, Self, A>
fn quote(&'a self, quote: &'b Quote) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn param(&'a self, param: &'b Param) -> DocBuilder<'a, Self, A>
fn param(&'a self, param: &'b Param) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn item(&'a self, item: &'b Item) -> DocBuilder<'a, Self, A>
fn item(&'a self, item: &'b Item) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn trait_item(&'a self, _: &'b TraitItem) -> DocBuilder<'a, Self, A>
fn trait_item(&'a self, _: &'b TraitItem) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn impl_item(&'a self, _: &'b ImplItem) -> DocBuilder<'a, Self, A>
fn impl_item(&'a self, _: &'b ImplItem) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn impl_ident(&'a self, _: &'b ImplIdent) -> DocBuilder<'a, Self, A>
fn impl_ident(&'a self, _: &'b ImplIdent) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn trait_goal(&'a self, _: &'b TraitGoal) -> DocBuilder<'a, Self, A>
fn trait_goal(&'a self, _: &'b TraitGoal) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn variant(&'a self, _: &'b Variant) -> DocBuilder<'a, Self, A>
fn variant(&'a self, _: &'b Variant) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn emit_diagnostic(&'a self, kind: Kind)
fn emit_diagnostic(&'a self, kind: Kind)
Source§fn todo_document(
&'a self,
message: &str,
issue_id: Option<u32>,
) -> DocBuilder<'a, Self, A>
fn todo_document( &'a self, message: &str, issue_id: Option<u32>, ) -> DocBuilder<'a, Self, A>
todo_document!.Source§fn with_span<T>(&self, span: Span, action: impl Fn(&Self) -> T) -> T
fn with_span<T>(&self, span: Span, action: impl Fn(&Self) -> T) -> T
Source§fn unimplemented_method(
&'a self,
method: &str,
ast: FragmentRef<'_>,
) -> DocBuilder<'a, Self, A>
fn unimplemented_method( &'a self, method: &str, ast: FragmentRef<'_>, ) -> DocBuilder<'a, Self, A>
Source§fn expr_kind(&'a self, expr_kind: &'b ExprKind) -> DocBuilder<'a, Self, A>
fn expr_kind(&'a self, expr_kind: &'b ExprKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn ty_kind(&'a self, ty_kind: &'b TyKind) -> DocBuilder<'a, Self, A>
fn ty_kind(&'a self, ty_kind: &'b TyKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn metadata(&'a self, metadata: &'b Metadata) -> DocBuilder<'a, Self, A>
fn metadata(&'a self, metadata: &'b Metadata) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn lhs(&'a self, lhs: &'b Lhs) -> DocBuilder<'a, Self, A>
fn lhs(&'a self, lhs: &'b Lhs) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn symbol(&'a self, symbol: &'b Symbol) -> DocBuilder<'a, Self, A>
fn symbol(&'a self, symbol: &'b Symbol) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn loop_kind(&'a self, loop_kind: &'b LoopKind) -> DocBuilder<'a, Self, A>
fn loop_kind(&'a self, loop_kind: &'b LoopKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn safety_kind(&'a self, safety_kind: &'b SafetyKind) -> DocBuilder<'a, Self, A>
fn safety_kind(&'a self, safety_kind: &'b SafetyKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn binding_mode(
&'a self,
binding_mode: &'b BindingMode,
) -> DocBuilder<'a, Self, A>
fn binding_mode( &'a self, binding_mode: &'b BindingMode, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn region(&'a self, region: &'b Region) -> DocBuilder<'a, Self, A>
fn region(&'a self, region: &'b Region) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn impl_expr(&'a self, impl_expr: &'b ImplExpr) -> DocBuilder<'a, Self, A>
fn impl_expr(&'a self, impl_expr: &'b ImplExpr) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn float_kind(&'a self, float_kind: &'b FloatKind) -> DocBuilder<'a, Self, A>
fn float_kind(&'a self, float_kind: &'b FloatKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn loop_state(&'a self, loop_state: &'b LoopState) -> DocBuilder<'a, Self, A>
fn loop_state(&'a self, loop_state: &'b LoopState) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn control_flow_kind(
&'a self,
control_flow_kind: &'b ControlFlowKind,
) -> DocBuilder<'a, Self, A>
fn control_flow_kind( &'a self, control_flow_kind: &'b ControlFlowKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn dyn_trait_goal(
&'a self,
dyn_trait_goal: &'b DynTraitGoal,
) -> DocBuilder<'a, Self, A>
fn dyn_trait_goal( &'a self, dyn_trait_goal: &'b DynTraitGoal, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn attribute(&'a self, attribute: &'b Attribute) -> DocBuilder<'a, Self, A>
fn attribute(&'a self, attribute: &'b Attribute) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn borrow_kind(&'a self, borrow_kind: &'b BorrowKind) -> DocBuilder<'a, Self, A>
fn borrow_kind(&'a self, borrow_kind: &'b BorrowKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn impl_expr_kind(
&'a self,
impl_expr_kind: &'b ImplExprKind,
) -> DocBuilder<'a, Self, A>
fn impl_expr_kind( &'a self, impl_expr_kind: &'b ImplExprKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn int_size(&'a self, int_size: &'b IntSize) -> DocBuilder<'a, Self, A>
fn int_size(&'a self, int_size: &'b IntSize) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn signedness(&'a self, signedness: &'b Signedness) -> DocBuilder<'a, Self, A>
fn signedness(&'a self, signedness: &'b Signedness) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn guard(&'a self, guard: &'b Guard) -> DocBuilder<'a, Self, A>
fn guard(&'a self, guard: &'b Guard) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn attribute_kind(
&'a self,
attribute_kind: &'b AttributeKind,
) -> DocBuilder<'a, Self, A>
fn attribute_kind( &'a self, attribute_kind: &'b AttributeKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn guard_kind(&'a self, guard_kind: &'b GuardKind) -> DocBuilder<'a, Self, A>
fn guard_kind(&'a self, guard_kind: &'b GuardKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn impl_item_kind(
&'a self,
impl_item_kind: &'b ImplItemKind,
) -> DocBuilder<'a, Self, A>
fn impl_item_kind( &'a self, impl_item_kind: &'b ImplItemKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn trait_item_kind(
&'a self,
trait_item_kind: &'b TraitItemKind,
) -> DocBuilder<'a, Self, A>
fn trait_item_kind( &'a self, trait_item_kind: &'b TraitItemKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn item_quote_origin(
&'a self,
item_quote_origin: &'b ItemQuoteOrigin,
) -> DocBuilder<'a, Self, A>
fn item_quote_origin( &'a self, item_quote_origin: &'b ItemQuoteOrigin, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn item_quote_origin_kind(
&'a self,
item_quote_origin_kind: &'b ItemQuoteOriginKind,
) -> DocBuilder<'a, Self, A>
fn item_quote_origin_kind( &'a self, item_quote_origin_kind: &'b ItemQuoteOriginKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn item_quote_origin_position(
&'a self,
item_quote_origin_position: &'b ItemQuoteOriginPosition,
) -> DocBuilder<'a, Self, A>
fn item_quote_origin_position( &'a self, item_quote_origin_position: &'b ItemQuoteOriginPosition, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn generic_param_kind(
&'a self,
generic_param_kind: &'b GenericParamKind,
) -> DocBuilder<'a, Self, A>
fn generic_param_kind( &'a self, generic_param_kind: &'b GenericParamKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn projection_predicate(
&'a self,
projection_predicate: &'b ProjectionPredicate,
) -> DocBuilder<'a, Self, A>
fn projection_predicate( &'a self, projection_predicate: &'b ProjectionPredicate, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn doc_comment_kind(
&'a self,
doc_comment_kind: &'b DocCommentKind,
) -> DocBuilder<'a, Self, A>
fn doc_comment_kind( &'a self, doc_comment_kind: &'b DocCommentKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn item_kind(&'a self, item_kind: &'b ItemKind) -> DocBuilder<'a, Self, A>
fn item_kind(&'a self, item_kind: &'b ItemKind) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn error_node(&'a self, error_node: &'b ErrorNode) -> DocBuilder<'a, Self, A>
fn error_node(&'a self, error_node: &'b ErrorNode) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_expr_kind(
&'a self,
resugared_expr_kind: &'b ResugaredExprKind,
) -> DocBuilder<'a, Self, A>
fn resugared_expr_kind( &'a self, resugared_expr_kind: &'b ResugaredExprKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_ty_kind(
&'a self,
resugared_ty_kind: &'b ResugaredTyKind,
) -> DocBuilder<'a, Self, A>
fn resugared_ty_kind( &'a self, resugared_ty_kind: &'b ResugaredTyKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_pat_kind(
&'a self,
resugared_pat_kind: &'b ResugaredPatKind,
) -> DocBuilder<'a, Self, A>
fn resugared_pat_kind( &'a self, resugared_pat_kind: &'b ResugaredPatKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_impl_item_kind(
&'a self,
resugared_impl_item_kind: &'b ResugaredImplItemKind,
) -> DocBuilder<'a, Self, A>
fn resugared_impl_item_kind( &'a self, resugared_impl_item_kind: &'b ResugaredImplItemKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_trait_item_kind(
&'a self,
resugared_trait_item_kind: &'b ResugaredTraitItemKind,
) -> DocBuilder<'a, Self, A>
fn resugared_trait_item_kind( &'a self, resugared_trait_item_kind: &'b ResugaredTraitItemKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§fn resugared_item_kind(
&'a self,
resugared_item_kind: &'b ResugaredItemKind,
) -> DocBuilder<'a, Self, A>
fn resugared_item_kind( &'a self, resugared_item_kind: &'b ResugaredItemKind, ) -> DocBuilder<'a, Self, A>
pretty::Pretty::pretty] instead, so annotations/spans are preserved correctly.pretty::Pretty::pretty instead, so annotations/spans are preserved correctly.Source§impl Printer for LeanPrinter
impl Printer for LeanPrinter
Source§fn resugaring_phases() -> Vec<Box<dyn Resugaring>>
fn resugaring_phases() -> Vec<Box<dyn Resugaring>>
Source§impl RenderView for LeanPrinter
impl RenderView for LeanPrinter
Source§fn separator(&self) -> &str
fn separator(&self) -> &str
"::"). Read moreSource§fn render_path_segment(&self, chunk: &PathSegment) -> Vec<String>
fn render_path_segment(&self, chunk: &PathSegment) -> Vec<String>
PathSegment into a vector of display atoms. Read moreSource§fn render_unnamed_path_segment_payload(
&self,
unnamed: UnnamedPathSegmentPayload,
) -> Symbol
fn render_unnamed_path_segment_payload( &self, unnamed: UnnamedPathSegmentPayload, ) -> Symbol
Source§fn render_path_segment_payload(&self, payload: PathSegmentPayload) -> Symbol
fn render_path_segment_payload(&self, payload: PathSegmentPayload) -> Symbol
Source§fn rendered_to_strings(
&self,
rendered: Rendered,
) -> impl Iterator<Item = String>
fn rendered_to_strings( &self, rendered: Rendered, ) -> impl Iterator<Item = String>
Source§fn rendered_to_string(&self, rendered: Rendered) -> String
fn rendered_to_string(&self, rendered: Rendered) -> String
Auto Trait Implementations§
impl Freeze for LeanPrinter
impl RefUnwindSafe for LeanPrinter
impl Send for LeanPrinter
impl Sync for LeanPrinter
impl Unpin for LeanPrinter
impl UnwindSafe for LeanPrinter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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