Skip to content

Commit f17c0ce

Browse files
committed
stub fixups
1 parent e2f287b commit f17c0ce

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/shims/native_lib/trace/stub.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
use rustc_const_eval::interpret::InterpResult;
22

3+
static SUPERVISOR: std::sync::Mutex<()> = std::sync::Mutex::new(());
4+
35
pub struct Supervisor;
46

5-
static SUPERVISOR: std::sync::Mutex<Option<Supervisor>> = std::sync::Mutex::new(None);
7+
#[derive(Debug)]
8+
pub struct SvInitError;
69

710
impl Supervisor {
811
#[inline(always)]
@@ -20,13 +23,10 @@ impl Supervisor {
2023
}
2124
}
2225

26+
#[inline(always)]
2327
#[allow(dead_code, clippy::missing_safety_doc)]
24-
pub unsafe fn init_sv() -> Result<(), !> {
25-
let mut sv_guard = SUPERVISOR.lock().unwrap();
26-
if sv_guard.is_none() {
27-
*sv_guard = Some(Supervisor);
28-
}
29-
Ok(())
28+
pub unsafe fn init_sv() -> Result<!, SvInitError> {
29+
Err(SvInitError)
3030
}
3131

3232
#[inline(always)]

0 commit comments

Comments
 (0)