luaur_common/records/scope.rs
1use crate::records::thread_context::ThreadContext;
2
3#[allow(non_camel_case_types)]
4#[derive(Debug)]
5pub struct Scope {
6 pub(crate) context: *mut ThreadContext,
7}
8
9impl Drop for Scope {
10 fn drop(&mut self) {
11 #[cfg(feature = "luau_enable_time_trace")]
12 {
13 if crate::FFlag::DebugLuauTimeTracing.get() {
14 unsafe {
15 (*self.context).event_leave();
16 }
17 }
18 }
19 }
20}