pub struct CodegenError { /* private fields */ }Expand description
A defect in the LIR fed to codegen — an invariant that a well-formed
Program is guaranteed to satisfy by earlier, non-suppressible compiler
stages, which codegen has no independent way to verify structurally
beyond this checkpoint. See #586: with #577’s Nop degradation removed,
container.rs’s LogicBreak/LogicContinue handling had zero
codegen-level guard against a loop_stack that’s empty — a future or
refactored LIR producer that ever emitted one outside a loop would
silently corrupt bytecode via an unpatched Jump(0) that looks
well-formed, rather than fail. This is the hard error that replaces
that silent corruption; today it can only fire on hand-assembled LIR
that bypasses brink-ir::lir::lower (which rejects this case at E057,
non-suppressibly, before a Program is ever produced).
Trait Implementations§
Source§impl Clone for CodegenError
impl Clone for CodegenError
Source§fn clone(&self) -> CodegenError
fn clone(&self) -> CodegenError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodegenError
impl Debug for CodegenError
Source§impl Display for CodegenError
impl Display for CodegenError
impl Eq for CodegenError
Source§impl Error for CodegenError
impl Error for CodegenError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()