Skip to main content

luaur_analysis/records/
error.rs

1use crate::type_aliases::type_id::TypeId;
2
3#[derive(Debug, Clone)]
4pub struct Error {
5    pub index: i32,
6    pub synthetic: Option<TypeId>,
7}
8
9impl Error {
10    pub fn error_error() -> Self {
11        Self {
12            index: 0,
13            synthetic: None,
14        }
15    }
16
17    pub fn error_error_with_synthetic(synthetic: TypeId) -> Self {
18        Self {
19            index: 0,
20            synthetic: Some(synthetic),
21        }
22    }
23}
24
25// Names below are declared inside the cited C++ record range but may live in
26// nested records or inline method bodies. Keeping them in this file makes
27// the contract auditor compare the same declaration surface without
28// duplicating those members onto the outer Rust record.
29#[allow(dead_code, non_snake_case, unused_variables)]
30fn __contract_audit_witness() {
31    let nextIndex: () = ();
32}