summaryrefslogtreecommitdiff
path: root/ops/optimizer_tests/param_mut_binding_warning.out
diff options
context:
space:
mode:
Diffstat (limited to 'ops/optimizer_tests/param_mut_binding_warning.out')
-rw-r--r--ops/optimizer_tests/param_mut_binding_warning.out20
1 files changed, 14 insertions, 6 deletions
diff --git a/ops/optimizer_tests/param_mut_binding_warning.out b/ops/optimizer_tests/param_mut_binding_warning.out
index 1655ece76..98dc6b2b9 100644
--- a/ops/optimizer_tests/param_mut_binding_warning.out
+++ b/ops/optimizer_tests/param_mut_binding_warning.out
@@ -6,17 +6,25 @@
pub struct op_read_sync;
#[doc(hidden)]
impl op_read_sync {
- pub fn name() -> &'static str {
+ pub const fn name() -> &'static str {
stringify!(op_read_sync)
}
- pub fn v8_fn_ptr<'scope>() -> deno_core::v8::FunctionCallback {
- use deno_core::v8::MapFnTo;
- Self::v8_func.map_fn_to()
+ #[allow(clippy::not_unsafe_ptr_arg_deref)]
+ pub extern "C" fn v8_fn_ptr<'scope>(
+ info: *const deno_core::v8::FunctionCallbackInfo,
+ ) {
+ let info = unsafe { &*info };
+ let scope = &mut unsafe { deno_core::v8::CallbackScope::new(info) };
+ let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(
+ info,
+ );
+ let rv = deno_core::v8::ReturnValue::from_function_callback_info(info);
+ Self::v8_func(scope, args, rv);
}
- pub fn decl<'scope>() -> deno_core::OpDecl {
+ pub const fn decl<'scope>() -> deno_core::OpDecl {
deno_core::OpDecl {
name: Self::name(),
- v8_fn_ptr: Self::v8_fn_ptr(),
+ v8_fn_ptr: Self::v8_fn_ptr as _,
enabled: true,
fast_fn: None,
is_async: false,