Struct cl_ast::desugar::while_else::WhileElseDesugar

source ·
pub struct WhileElseDesugar;
Expand description

Desugars while-else expressions into loop-if-else-break expressions

Trait Implementations§

source§

impl Fold for WhileElseDesugar

source§

fn fold_expr(&mut self, e: Expr) -> Expr

source§

fn fold_span(&mut self, extents: Span) -> Span

source§

fn fold_mutability(&mut self, mutability: Mutability) -> Mutability

source§

fn fold_visibility(&mut self, visibility: Visibility) -> Visibility

source§

fn fold_sym(&mut self, ident: Sym) -> Sym

source§

fn fold_literal(&mut self, lit: Literal) -> Literal

source§

fn fold_bool(&mut self, b: bool) -> bool

source§

fn fold_char(&mut self, c: char) -> char

source§

fn fold_int(&mut self, i: u128) -> u128

source§

fn fold_string(&mut self, s: String) -> String

source§

fn fold_file(&mut self, f: File) -> File

source§

fn fold_attrs(&mut self, a: Attrs) -> Attrs

source§

fn fold_meta(&mut self, m: Meta) -> Meta

source§

fn fold_meta_kind(&mut self, kind: MetaKind) -> MetaKind

source§

fn fold_item(&mut self, i: Item) -> Item

source§

fn fold_item_kind(&mut self, kind: ItemKind) -> ItemKind

source§

fn fold_alias(&mut self, a: Alias) -> Alias

source§

fn fold_const(&mut self, c: Const) -> Const

source§

fn fold_static(&mut self, s: Static) -> Static

source§

fn fold_module(&mut self, m: Module) -> Module

source§

fn fold_module_kind(&mut self, m: ModuleKind) -> ModuleKind

source§

fn fold_function(&mut self, f: Function) -> Function

source§

fn fold_param(&mut self, p: Param) -> Param

source§

fn fold_struct(&mut self, s: Struct) -> Struct

source§

fn fold_struct_kind(&mut self, kind: StructKind) -> StructKind

source§

fn fold_struct_member(&mut self, m: StructMember) -> StructMember

source§

fn fold_enum(&mut self, e: Enum) -> Enum

source§

fn fold_enum_kind(&mut self, kind: EnumKind) -> EnumKind

source§

fn fold_variant(&mut self, v: Variant) -> Variant

source§

fn fold_variant_kind(&mut self, kind: VariantKind) -> VariantKind

source§

fn fold_impl(&mut self, i: Impl) -> Impl

source§

fn fold_impl_kind(&mut self, kind: ImplKind) -> ImplKind

source§

fn fold_use(&mut self, u: Use) -> Use

source§

fn fold_use_tree(&mut self, tree: UseTree) -> UseTree

source§

fn fold_ty(&mut self, t: Ty) -> Ty

source§

fn fold_ty_kind(&mut self, kind: TyKind) -> TyKind

source§

fn fold_ty_tuple(&mut self, t: TyTuple) -> TyTuple

source§

fn fold_ty_ref(&mut self, t: TyRef) -> TyRef

source§

fn fold_ty_fn(&mut self, t: TyFn) -> TyFn

source§

fn fold_path(&mut self, p: Path) -> Path

source§

fn fold_path_part(&mut self, p: PathPart) -> PathPart

source§

fn fold_stmt(&mut self, s: Stmt) -> Stmt

source§

fn fold_stmt_kind(&mut self, kind: StmtKind) -> StmtKind

source§

fn fold_semi(&mut self, s: Semi) -> Semi

source§

fn fold_let(&mut self, l: Let) -> Let

source§

fn fold_expr_kind(&mut self, kind: ExprKind) -> ExprKind

source§

fn fold_assign(&mut self, a: Assign) -> Assign

source§

fn fold_modify(&mut self, m: Modify) -> Modify

source§

fn fold_modify_kind(&mut self, kind: ModifyKind) -> ModifyKind

source§

fn fold_binary(&mut self, b: Binary) -> Binary

source§

fn fold_binary_kind(&mut self, kind: BinaryKind) -> BinaryKind

source§

fn fold_unary(&mut self, u: Unary) -> Unary

source§

fn fold_unary_kind(&mut self, kind: UnaryKind) -> UnaryKind

source§

fn fold_member(&mut self, m: Member) -> Member

source§

fn fold_member_kind(&mut self, kind: MemberKind) -> MemberKind

source§

fn fold_index(&mut self, i: Index) -> Index

source§

fn fold_structor(&mut self, s: Structor) -> Structor

source§

fn fold_fielder(&mut self, f: Fielder) -> Fielder

source§

fn fold_array(&mut self, a: Array) -> Array

source§

fn fold_array_rep(&mut self, a: ArrayRep) -> ArrayRep

source§

fn fold_addrof(&mut self, a: AddrOf) -> AddrOf

source§

fn fold_block(&mut self, b: Block) -> Block

source§

fn fold_group(&mut self, g: Group) -> Group

source§

fn fold_tuple(&mut self, t: Tuple) -> Tuple

source§

fn fold_loop(&mut self, l: Loop) -> Loop

source§

fn fold_while(&mut self, w: While) -> While

source§

fn fold_if(&mut self, i: If) -> If

source§

fn fold_for(&mut self, f: For) -> For

source§

fn fold_else(&mut self, e: Else) -> Else

source§

fn fold_break(&mut self, b: Break) -> Break

source§

fn fold_return(&mut self, r: Return) -> Return

source§

fn fold_continue(&mut self, c: Continue) -> Continue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.