Skip to main content

rune_ssa/
error.rs

1use crate::{BlockId, StaticId, Var};
2use thiserror::Error;
3
4/// Error raised during machine construction.
5#[allow(missing_docs)]
6#[derive(Debug, Error)]
7pub enum Error {
8    #[error("cannot jump {0} -> {0}: destination is sealed")]
9    SealedBlockJump(BlockId, BlockId),
10    #[error("missing phi node for static id {0}")]
11    MissingPhiNode(StaticId),
12    #[error("missing value for static id {0}")]
13    MissingValue(StaticId),
14    #[error("missing block with id {0}")]
15    MissingBlock(BlockId),
16    #[error("tried to construct a float constant that is NaN")]
17    FloatIsNan,
18    #[error("missing local assignment {0}")]
19    MissingLocal(Var),
20}