Closed littledivy closed 2 weeks ago
Allow #[cppgc] _: &mut T and #[cppgc] _: Option<&mut T>
#[cppgc] _: &mut T
#[cppgc] _: Option<&mut T>
Closes https://github.com/denoland/deno_core/issues/787
Trying to use it with async op gives a compiler error:
error[E0308]: mismatched types --> core/runtime/ops.rs:1911:3 | 1911 | #[op2(async)] | ^^^^^^^^^^^^^ | | | types differ in mutability | arguments to this function are incorrect | = note: expected mutable reference `&mut TestResource` found reference `&TestResource` note: associated function defined here --> core/runtime/ops.rs:1911:3 | 1911 | #[op2(async)] | ^^^^^^^^^^^^^ 1912 | pub async fn op_test_set_cppgc_resource(#[cppgc] resource: &mut TestResource, value: u32) {
Allow
#[cppgc] _: &mut T
and#[cppgc] _: Option<&mut T>
Closes https://github.com/denoland/deno_core/issues/787
Trying to use it with async op gives a compiler error: