From b5dfcbbcbe6be8ac0a54e14eb8aeb0557b58f55d Mon Sep 17 00:00:00 2001 From: Aapo Alasuutari Date: Fri, 23 Sep 2022 05:55:37 +0300 Subject: feat(ops): Fallible fast ops (#15989) --- ops/tests/compile_fail/unsupported.rs | 5 ----- ops/tests/compile_fail/unsupported.stderr | 16 ++++------------ 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'ops/tests') diff --git a/ops/tests/compile_fail/unsupported.rs b/ops/tests/compile_fail/unsupported.rs index 52d55de5b..5856d72ef 100644 --- a/ops/tests/compile_fail/unsupported.rs +++ b/ops/tests/compile_fail/unsupported.rs @@ -2,11 +2,6 @@ use deno_ops::op; -#[op(fast)] -fn op_result_return(a: i32, b: i32) -> Result<(), ()> { - a + b -} - #[op(fast)] fn op_u8_arg(a: u8, b: u8) { // diff --git a/ops/tests/compile_fail/unsupported.stderr b/ops/tests/compile_fail/unsupported.stderr index 88d1c1fe4..9a1d1462d 100644 --- a/ops/tests/compile_fail/unsupported.stderr +++ b/ops/tests/compile_fail/unsupported.stderr @@ -15,9 +15,9 @@ error: custom attribute panicked = help: message: op cannot be a fast api. enforced by #[op(fast)] error: custom attribute panicked - --> tests/compile_fail/unsupported.rs:15:1 + --> tests/compile_fail/unsupported.rs:17:1 | -15 | #[op(fast)] +17 | #[op(fast)] | ^^^^^^^^^^^ | = help: message: op cannot be a fast api. enforced by #[op(fast)] @@ -26,22 +26,14 @@ error: custom attribute panicked --> tests/compile_fail/unsupported.rs:22:1 | 22 | #[op(fast)] - | ^^^^^^^^^^^ - | - = help: message: op cannot be a fast api. enforced by #[op(fast)] - -error: custom attribute panicked - --> tests/compile_fail/unsupported.rs:27:1 - | -27 | #[op(fast)] | ^^^^^^^^^^^ | = help: message: async op cannot be a fast api. enforced by #[op(fast)] warning: unused import: `deno_core::v8::fast_api::FastApiCallbackOptions` - --> tests/compile_fail/unsupported.rs:20:5 + --> tests/compile_fail/unsupported.rs:15:5 | -20 | use deno_core::v8::fast_api::FastApiCallbackOptions; +15 | use deno_core::v8::fast_api::FastApiCallbackOptions; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default -- cgit v1.2.3