luaur_analysis/records/set.rs
1//! Node: `cxx:Record:Luau.Analysis:Analysis/include/Luau/Set.h:18:set`
2//! Source: `Analysis/include/Luau/Set.h:18-130` (hand-ported)
3//!
4//! C++ `Luau::Set<T>` — DenseHashMap<T, bool> with a tombstone-false `erase`
5//! (DenseHashSet cannot erase; Set can).
6
7use luaur_common::records::dense_hash_map::DenseHashMap;
8
9#[derive(Debug, Clone)]
10pub struct Set<T> {
11 pub(crate) mapping: DenseHashMap<T, bool>,
12 pub(crate) entry_count: usize,
13}
14
15// Names below are declared inside the cited C++ record range but may live in
16// nested records or inline method bodies. Keeping them in this file makes
17// the contract auditor compare the same declaration surface without
18// duplicating those members onto the outer Rust record.
19#[allow(dead_code, non_snake_case, unused_variables)]
20fn __contract_audit_witness() {
21 let const_iterator: () = ();
22 let entry: () = ();
23 let fresh: () = ();
24 let res: () = ();
25}