found: Option<BlockIdx>,
expected: Option<BlockIdx>,
},
+ #[error(
+ "critical edges are not allowed: source block {src_block} has \
+ multiple successors and target block {tgt_block} has multiple \
+ predecessors: source block's terminating branch {branch_inst}"
+ )]
+ CriticalEdgeNotAllowed {
+ src_block: BlockIdx,
+ branch_inst: InstIdx,
+ tgt_block: BlockIdx,
+ },
}
pub type Result<T, E = Error> = std::result::Result<T, E>;
+
+impl From<Error> for arbitrary::Error {
+ fn from(_value: Error) -> Self {
+ Self::IncorrectFormat
+ }
+}