mod arch; mod asm; mod block; mod def; mod expr; mod func; mod module; mod struc; mod ty; use super::*; pub use func::FnLowerCtx; pub trait FnLowerable { type Output; fn lower(&self, ctx: &mut FnLowerCtx) -> Option; } impl FnLowerable for Node { type Output = T::Output; fn lower(&self, ctx: &mut FnLowerCtx) -> Option { let old_span = ctx.span; ctx.span = self.span; let res = self.as_ref()?.lower(ctx); ctx.span = old_span; res } } impl FnLowerable for Box { type Output = T::Output; fn lower(&self, ctx: &mut FnLowerCtx) -> Option { self.as_ref().lower(ctx) } }