miri/shims/native_lib/trace/
stub.rs1use rustc_const_eval::interpret::{InterpResult, interp_ok};
2
3static SUPERVISOR: std::sync::Mutex<()> = std::sync::Mutex::new(());
4
5pub struct Supervisor;
6
7#[derive(Debug)]
8pub struct SvInitError;
9
10impl Supervisor {
11 #[inline(always)]
12 pub fn is_enabled() -> bool {
13 false
14 }
15
16 pub fn do_ffi<'tcx, T, U>(
17 _: T,
18 f: impl FnOnce() -> U,
19 ) -> InterpResult<'tcx, (U, Option<super::MemEvents>)> {
20 let _g = SUPERVISOR.lock().unwrap();
22 interp_ok((f(), None))
23 }
24}
25
26#[inline(always)]
27#[allow(dead_code, clippy::missing_safety_doc)]
28pub unsafe fn init_sv() -> Result<!, SvInitError> {
29 Err(SvInitError)
30}
31
32#[inline(always)]
33#[allow(dead_code)]
34pub fn register_retcode_sv<T>(_: T) {}