diff --git a/lib/engine-jit/src/artifact.rs b/lib/engine-jit/src/artifact.rs index f7bca8910..87964c430 100644 --- a/lib/engine-jit/src/artifact.rs +++ b/lib/engine-jit/src/artifact.rs @@ -280,7 +280,6 @@ impl Artifact for JITArtifact { &self.finished_function_call_trampolines } - // TODO: return *const instead of *mut fn finished_dynamic_function_trampolines(&self) -> &BoxedSlice { &self.finished_dynamic_function_trampolines } diff --git a/lib/vm/src/lib.rs b/lib/vm/src/lib.rs index f8e649f59..6bb28dd53 100644 --- a/lib/vm/src/lib.rs +++ b/lib/vm/src/lib.rs @@ -61,10 +61,10 @@ pub const VERSION: &str = env!("CARGO_PKG_VERSION"); /// A safe wrapper around `VMFunctionBody` #[derive(Clone, Copy, Debug)] #[repr(transparent)] -pub struct FunctionBodyPtr(pub *mut [VMFunctionBody]); +pub struct FunctionBodyPtr(pub *const [VMFunctionBody]); impl std::ops::Deref for FunctionBodyPtr { - type Target = *mut [VMFunctionBody]; + type Target = *const [VMFunctionBody]; fn deref(&self) -> &Self::Target { &self.0