From b0a671df8e2796a30fea4fab06018abee738c8ac Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Mon, 5 Sep 2022 02:59:36 +0100 Subject: fix(ops): use qualified borrow in op macro (#15769) Fix https://github.com/denoland/deno/issues/15764 Use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow --- ops/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ops/lib.rs') diff --git a/ops/lib.rs b/ops/lib.rs index 437fa3b7e..f75972c51 100644 --- a/ops/lib.rs +++ b/ops/lib.rs @@ -476,7 +476,8 @@ fn codegen_v8_sync( let result = Self::call::<#type_params>(#args_head #args_tail); - let op_state = &*ctx.state.borrow(); + // use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow + let op_state = ::std::cell::RefCell::borrow(&*ctx.state); op_state.tracker.track_sync(ctx.id); #ret -- cgit v1.2.3