| 1 |
pub type Origin = usize; |
| 2 |
pub type Loan = usize; |
| 3 |
pub type Point = usize; |
| 4 |
pub type Variable = usize; |
| 5 |
pub type Path = usize; |
| 6 |
|
| 7 |
#[repr(C)] |
| 8 |
#[derive(Debug, Copy, Clone)] |
| 9 |
pub struct Pair<T1, T2> { |
| 10 |
pub first: T1, |
| 11 |
pub second: T2, |
| 12 |
} |
| 13 |
|
| 14 |
#[repr(C)] |
| 15 |
#[derive(Debug, Copy, Clone)] |
| 16 |
pub struct Triple<T1, T2, T3> { |
| 17 |
pub first: T1, |
| 18 |
pub second: T2, |
| 19 |
pub third: T3, |
| 20 |
} |
| 21 |
|
| 22 |
#[repr(C)] |
| 23 |
#[derive(Debug, Copy, Clone)] |
| 24 |
pub struct Slice<T> { |
| 25 |
pub len: usize, |
| 26 |
pub data: *const T, |
| 27 |
} |
| 28 |
|
| 29 |
#[repr(C)] |
| 30 |
#[derive(Debug, Copy, Clone)] |
| 31 |
pub struct FactsView { |
| 32 |
pub loan_issued_at: Slice<Triple<Origin, Loan, Point>>, |
| 33 |
pub universal_region: Slice<Origin>, |
| 34 |
pub cfg_edge: Slice<Pair<Point, Point>>, |
| 35 |
pub loan_killed_at: Slice<Pair<Loan, Point>>, |
| 36 |
pub subset_base: Slice<Triple<Origin, Origin, Point>>, |
| 37 |
pub loan_invalidated_at: Slice<Pair<Point, Loan>>, |
| 38 |
pub var_used_at: Slice<Pair<Variable, Point>>, |
| 39 |
pub var_defined_at: Slice<Pair<Variable, Point>>, |
| 40 |
pub var_dropped_at: Slice<Pair<Variable, Point>>, |
| 41 |
pub use_of_var_derefs_origin: Slice<Pair<Variable, Origin>>, |
| 42 |
pub drop_of_var_derefs_origin: Slice<Pair<Variable, Origin>>, |
| 43 |
pub child_path: Slice<Pair<Path, Path>>, |
| 44 |
pub path_is_var: Slice<Pair<Path, Variable>>, |
| 45 |
pub path_assigned_at_base: Slice<Pair<Path, Point>>, |
| 46 |
pub path_moved_at_base: Slice<Pair<Path, Point>>, |
| 47 |
pub path_accessed_at_base: Slice<Pair<Path, Point>>, |
| 48 |
pub known_placeholder_subset: Slice<Pair<Origin, Origin>>, |
| 49 |
pub placeholder: Slice<Pair<Origin, Loan>>, |
| 50 |
} |
| 51 |
|
| 52 |
#[repr(C)] |
| 53 |
#[derive(Debug, Copy, Clone)] |
| 54 |
pub struct Output { |
| 55 |
pub loan_errors: *mut FFIVector, |
| 56 |
pub move_errors: *mut FFIVector, |
| 57 |
pub subset_errors: *mut FFIVector, |
| 58 |
} |