Skip to main content

Phase

Trait Phase 

Source
pub trait Phase: 'static + Sealed {
    type DeclSugar: Debug + Clone;
    type ExprSugar: Debug + Clone;
}
Expand description

Marker trait for AST phases.

Sealed: only Raw and Desugared implement it.

Required Associated Types§

Source

type DeclSugar: Debug + Clone

Phase-specific declaration sugar variants.

Carried by DeclKind::Sugar(_). For Raw this is crate::syntax::ast::RawDeclSugar; for Desugared it is Infallible so the variant cannot be constructed.

Source

type ExprSugar: Debug + Clone

Phase-specific expression sugar variants.

Carried by ExprKind::Sugar(_). For Raw this is crate::syntax::ast::RawExprSugar; for Desugared it is Infallible.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§