Skip to main content

luaur_analysis/records/
data_flow_result.rs

1use crate::records::refinement_key::RefinementKey;
2
3/// `DefId` is a `NotNull<const Def>`, which in Rust is represented as a non-null raw pointer to a `Def`.
4/// Since `Def` is an opaque or yet-to-be-translated struct in this context, we use `*const c_void` or a placeholder.
5/// Based on the provided `Def.h` fragment, `DefId` is a pointer to a `Def`.
6pub type DefId = *const core::ffi::c_void;
7
8#[derive(Debug, Clone, Copy)]
9pub struct DataFlowResult {
10    pub def: DefId,
11    pub parent: *const RefinementKey,
12}
13
14impl Default for DataFlowResult {
15    fn default() -> Self {
16        Self {
17            def: core::ptr::null(),
18            parent: core::ptr::null(),
19        }
20    }
21}